private void button11_Click(object sender, EventArgs e) { ClassAsync c = new ClassAsync(); var s = c.MethodAsync(DateTime.Now); MessageBox.Show(s.ToString()); }
private void button12_Click(object sender, EventArgs e) { string s = string.Empty; ClassAsync c = new ClassAsync(); int i = c.Test(1); s += i.ToString() + ","; i = c.Test(1, true); s += i.ToString() + ","; i = c.Test(1, false); s += i.ToString() + ","; MessageBox.Show(s.ToString()); }