要传递多个不同类型的参数:
private void Test(){
int a = 123;
string b = "456";
bool c = true;
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += (o, ea) =>
{
Worker_DoWork<T>(a, b, c);
};
worker.RunWorkerCompleted += (o, ea) =>
{
};
worker.RunWorkerAsync();
}
private void Worker_DoWork<T>(int a, string b, bool c)
{
}
|
请发表评论