ThreadingTester
using System;
using System.Threading;
namespace ThreadingTester
{
class ThreadingTester
{
public static void trmain()
{
for (int x = 0; x < 100; x++)
{
Thread.Sleep(1000);
Console.WriteLine(x);
}
}
static void Main(string[] args)
{
Thread thrd1 = new Thread(new ThreadStart(trmain));
thrd1.Start();
for (int x = 0; x < 100; x++)
{
//Thread.Sleep(1000);
Console.WriteLine("Main :" + x);
}
}
}
//public delegate int mydg(int a, int b);
//public static class LambdaTest
//{
// public static int oper(this int a, int b, mydg dg)
// {
// return dg(a, b);
// }
// public static void Main22()
// {
// Console.WriteLine(1.oper(2, (a, b) => a + b));
// Console.WriteLine(2.oper(1, (a, b) => a - b));
// }
//}
}
posted on 2011-11-15 22:35 breakpoint 阅读(87) 评论(0) 编辑 收藏 举报