action,func简洁用法

 new Action(() => { }).Invoke();
new Action(() => { })(); 
 
new Func<int, int>(s => { return s; }).Invoke(1);
 
new Func<int, List<int>>(s => { return new List<int>{1,2,3,4,5}; }).Invoke(1);
posted @ 2019-03-06 16:03  贾咩咩  Views(150)  Comments(0Edit  收藏  举报