Fork me on GitHub
上一页 1 ··· 7 8 9 10 11
摘要: 该操作首先求出条件表达式的值(bool类型),为true时调用表达式1,为flase时调用表达式2。其逻辑为:“如果为真执行第一个,否则执行第二个。”例如: Bad = (Bad == "") ? "0" :Bad; //C#中有一个三元运算符“?:”,语法为:条件表达式?表达式1:表达式2;a=3 阅读全文
posted @ 2017-07-06 19:29 都一样* 阅读(784) 评论(0) 推荐(0)
摘要: 使用Application.OpenForms解决 if(Application.OpenForms["Form1"]==null) { Form1 frm =new Form1(); frm.Show(); frm.MdiParent=this; } else{ Application.OpenForms["Form1"].Show(); } //在mdi窗体中... 阅读全文
posted @ 2017-07-06 19:11 都一样* 阅读(509) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11