摘要:
Application.Exit();//注意Application在using System.Windows.Forms命名空间中;System.Diagnostics.Process.GetCurrentProcess().Kill(); 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using CustomLib;namespace ConTest{ //委托的声明delegate void f(); delegate void f1(int n, int m); delegate void f2(string s1, string s2, string s3); class Sample { //为委托赋值注意下面奇怪的地方f f_fun = delegate { Console.WriteLine(&quo 阅读全文
摘要:
class Sample { //event EventHandler clickSample= delegate { };//这种方式也行 event EventHandler clickSample = delegate(object sender,EventArgs e) { }; public static void Main(string[] args) { Sample sam1 = new Sample(); sam1.btnStartup_Click(new object(), new EventArgs()); Console.Read(); } public void bt 阅读全文
摘要:
private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { MessageBox.Show(this.dateTimePicker1.Value.ToString());//返回日期和时间2013/32/6 10:06 MessageBox.Show(this.dateTimePicker1.Value.ToShortDateString());//返回日期2013/3/26 MessageBox.Show(this.dateTimePicker1.Value.ToOADate().ToString());// 阅读全文