110,539
社区成员
发帖
与我相关
我的任务
分享
[DllImport("e.dll", CharSet=CharSet.Ansi)]
public static extern string Receive(string s);
static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
{
var r = Receive(i.ToString());
Console.WriteLine(r);
}
Console.Read();
}
[DllImport("e.dll")]
public static extern string Receive(string s);
static void Main(string[] args)
{
for (int j = 0; j < 10; j++)
{
Task.Factory.StartNew(() =>
{
for (int i = 0; i < int.MaxValue; i++)
{
Console.WriteLine(Receive(i.ToString()));
Thread.Sleep(1000);
}
}
);
}
Console.Read();
}
程序运行一会就回出错