摘要: private void ThreadToMainExeption(){Thread t = new Thread(() =>{try{Console.WriteLine("work thread");}catch (Exception e){this.Invoke((Action)delegate{throw e;});//无法将lambda表达式转为delegate类型。//this.Invoke(() =>//{//});//无法将匿名方法转为委托类型。//this.Invoke(delegate//{// throw e;//});//该段代码可以通过, 阅读全文
posted @ 2012-03-27 10:30 viola 阅读(557) 评论(0) 推荐(0) 编辑