摘要:
DelegatesThe concept of delegates is a very powerful feature in many programming languages,including C#. Delegates的概念在许多编程语言中是强大的特性,包括C#. I believe that the discussion of advanced programming in C# c... 阅读全文
摘要:
参考书籍 《C# in a nutshell 8.0》 基本数据单元是序列和元素,序列是任何实现了IEnumberable接口的对象,而其中的每一项叫做一个元素。 Names就是一个序列,"Tom","Dick","Harry"就是元素。 Names 表示内存中的本地对象的集合,称之为"本地序列" We call this a local sequence because it represe... 阅读全文
摘要:
https://www.cnblogs.com/lizhenghao126/p/11053666.html 假如两个类型X和Y具有特殊关系,X类型的每个值都能转换成Y类型。我们将I向I的转换称为协变转换。反之我们将I向I的转换称为逆变转换。 简单的举个例子: List str; List obj; 我们知道在C#中所有引用类型都直接或间接地继承自Object类,所有str... 阅读全文
摘要:
https://www.cnblogs.com/dream-game/p/5532506.html using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace tryparse { cla... 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace delegateExample { delegate void MyDel(int value); //定义委托 ... 阅读全文