qq号码快速生成器,多线程几十秒可生成一亿个qq号 public static void qqNumberCreate(object args)    {      List<object> a= (List<object>)args;      string fileName = (string)a[0];      UInt64 count = (UInt64)a[1];      delegate_updateUI du = new delegate_updateUI(updateUI);      Console.WriteLine("thead "  fileName  "start\n");            // 创建文件      FileStream fs = new FileStream("QQdata\\" fileName ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite); //可以指定盘符,也可以指定任意文件名,还可以为word等文件      StreamWriter sw = new StreamWriter(fs); // 创建写入流      UInt64 num = (UInt64)a[2];      UInt64 stopNum = num  count;      while (Stop == false && num < stopNum)      {        sw.WriteLine(num.ToString()); // 写入Hello World        num ;        lock (lock_ob)        {          doneNum ;        }              }             Console.WriteLine("thead "  fileName  "stop\n");            sw.Close(); //关闭文件      fs.Close();    }
    public static void qqNumberCreate(object args)    {      List<object> a= (List<object>)args;      string fileName = (string)a[0];      UInt64 count = (UInt64)a[1];      delegate_updateUI du = new delegate_updateUI(updateUI);      Console.WriteLine("thead "  fileName  "start\n");            // 创建文件      FileStream fs = new FileStream("QQdata\\" fileName ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite); //可以指定盘符,也可以指定任意文件名,还可以为word等文件      StreamWriter sw = new StreamWriter(fs); // 创建写入流      UInt64 num = (UInt64)a[2];      UInt64 stopNum = num  count;      while (Stop == false && num < stopNum)      {        sw.WriteLine(num.ToString()); // 写入Hello World        num ;        lock (lock_ob)        {          doneNum ;        }              }             Console.WriteLine("thead "  fileName  "stop\n");            sw.Close(); //关闭文件      fs.Close();    }

 
  
					
				
评论