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# 异步多线程简单示例
原创
©著作权归作者所有:来自51CTO博客作者阿ou同学的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
C#中多线程和异步
异步:思想,多线程:实现。
多线程本质、异步本质 -
C - pthread多线程最简单示例
#include <pthread.h>#include <stdio.h>/* this function is run by the first thread */void *inc_x(void *x_void_ptr){&nb
include thread return function something -
Java多线程简单示例
多线程简单控制示例。1. extends Thread.package cn.com.keke.thread.test; /** * extends Thread * @author player * */ public&n
Java 多线程 Thread Runnable player -
多线程简单示例
转自原文多线程简单示例 结果:
网络编程、线程同步 i++ 回调函数 异步调用 异步线程