using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 多线程
{
class Program
{
static void Main(string[] args)
{
Action<OU> myAction2 = SomeMethod;
myAction2.BeginInvoke(new OU(11, "qwe"),null,null );
Console.ReadKey();
}
private static void SomeMethod(OU obj)
{
Console.WriteLine(obj.aa);
Console.WriteLine(obj.str);
}
class OU
{
public OU(int _aa,string _str)
{
aa = _aa;
str = _str;
}
public int aa { get; set; }
public string str { get; set; }
}
}
}
C# 异步多线程简单示例
最新推荐文章于 2024-06-27 17:08:24 发布