码迷,mamicode.com
首页 > 其他好文 > 详细

同步委托最简单的一个列子

时间:2018-10-08 13:27:11      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:tostring   pre   pac   同步   code   int   mes   fun   主线程   

同步委托简单的列子

namespace AsynDel
{
    class Program
    {
        static void Main(string[] args)
        {
            //同步委托,主线程来实现的
            Func<int, int, string> delFunc = (a, b) => (a + b).ToString();
            string str = delFunc(3, 4);
            Console.WriteLine(str);
            Console.ReadKey();
        }
    }
}

 

同步委托最简单的一个列子

标签:tostring   pre   pac   同步   code   int   mes   fun   主线程   

原文地址:https://www.cnblogs.com/xiaoyaohan/p/9753727.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!