首页 > 其他 > 详细

Action匿名委托示例

时间:2015-09-04 22:24:51      阅读:195      评论:0      收藏:0      [点我收藏+]
class Program
    {
        static void Main(string[] args)
        {
            string mid = ",mid";
            Action<string> anonDel = delegate (string param)
            {
                param += mid;
                param += " and this.";
                Console.WriteLine(param);
            };

            anonDel += delegate (string t)
            {
                Console.WriteLine(t + System.Guid.NewGuid().ToString());
            };

            anonDel("www.webczw.com");

            Console.ReadKey();
        }
    }

 

Action匿名委托示例

原文:http://www.cnblogs.com/webczw/p/4782408.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!