C#编程-146:最简单的开启线程

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ThreadingTest
{
    class Program
    {
        public static void method()
        {
            for (int i = 101; i <=990; i++)
            {
                if (i % 10 == 0) Console.WriteLine(i);
                else Console.Write(i+" ");
            }
        }
        static void Main(string[] args)
        {
            ThreadStart ts = new ThreadStart(method);
            Thread t = new Thread(ts);
            t.Start();
            Console.ReadLine();
        }
    }
}

C#编程-146:最简单的开启线程

上一篇:Android开源项目分类汇总


下一篇:iOS中使用block传值