namespace 委托_异步_回调
{
class Program
{
//创建委托,并实例化一个方法
public delegate string MyDelegate(object data);
private MyDelegate mydelegate = null;
static void Main(string[] args)
{
//开始异步执行
mydelegate =new MyDelegate(TestMethod);
IAsyncResult result = mydelegate.BeginInvoke("Thread Param", TestCallback, null);
//判断是否执行完成
C#中一个异步回调的实例
最新推荐文章于 2025-07-05 10:29:03 发布