C#学习
mulujute
这个作者很懒,什么都没留下…
展开
-
C# 改变窗体中所有TextBox控件的属性
foreach(Control item in this.Controls) { if (item is TextBox) { item.Text = "传播智客"; } }原创 2014-08-02 20:23:17 · 1126 阅读 · 1 评论 -
查找子串出现的次数以及索引
string msg = "你怎么又咳嗽了啊? 怎么能不咳嗽呢? 感冒了啊 多喝水就不会咳嗽了啊 是的 好的啊!"; int count = 0; int index = 0; while ((index=msg.IndexOf("咳嗽",index))!=-1) {原创 2014-07-31 23:12:04 · 384 阅读 · 0 评论 -
格式化时间
private void timer1_Tick(object sender, EventArgs e) { this.textBox3.Text = DateTime.Now.ToString(); this.textBox3.Text +="\n"+DateTime.Now.ToString("yyyy年M月d日 HH:mm原创 2014-08-07 20:45:27 · 305 阅读 · 0 评论 -
C# new关键字在方法隐藏中的使用
class ShangBan { public string name { set; get; } public virtual void DaKa() { Console.WriteLine("上班请打卡....");原创 2014-08-11 21:30:51 · 408 阅读 · 0 评论