样例工程

在VS2013里新建一个C#控制台工程,写下如下代码:

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;namespaceConsoleApplication1
{
classProgram
{
static void Main(string[] args)
{
Thread t1
= new Thread(newThreadStart(TestMethod));
t1.Start();
t1.Join();
}
public static voidTestMethod()
{
while (true)
{
StringBuilder sb
= new StringBuilder(1024*1024);
Thread.Sleep(
0);
}
}
}

}

标签: none

添加新评论