摘要: 接口是指定一组函数成员而不实现它们的一种引用类型。 阅读全文
posted @ 2020-07-08 23:19 司徒无名 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2020-07-01 12:51 司徒无名 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 图解C#教程 《Illustrated C# 7.0 The C# Language Presented Clearly,Concisely, and Visually Fifth Edition》 Stack Frames 栈帧 其实我至今为止对计算机很多魔幻翻译不理解。这个帧frame,算是一例。我有限的知识理解成 一层两层,包裹起来的,类似花括号区分开来的block区块一样,只是这个... 阅读全文
posted @ 2020-06-28 20:09 司徒无名 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 图解C#教程 《Illustrated C# 7.0 The C# Language Presented Clearly,Concisely, and Visually Fifth Edition》 Identifiers—标识符,理解为"变量名","类名"等名字。由于名字必须独一无二,所以用identifiers (身份identity) 规则: 首字母:字母和下划线和@-----yes... 阅读全文
posted @ 2020-06-26 20:32 司徒无名 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 参考书籍 《C# in a nutshell 8.0》 基本数据单元是序列和元素,序列是任何实现了IEnumberable接口的对象,而其中的每一项叫做一个元素。 Names就是一个序列,"Tom","Dick","Harry"就是元素。 Names 表示内存中的本地对象的集合,称之为"本地序列" We call this a local sequence because it represe... 阅读全文
posted @ 2020-06-24 20:57 司徒无名 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 参考书籍《Illustrated C#7, 5th Edition》 什么是LINQ? LINQ = Language Integrated Query 发音"link" LINQ是.NET框架的扩展。用类似SQL语法查询数据库一样,来查询数据集。SQL查询数据库,database。LINQ查询数据集,data collection 原因是SQL查询规范的表格,也即数据库,而LINQ不一定是规... 阅读全文
posted @ 2020-06-23 20:39 司徒无名 阅读(190) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/lizhenghao126/p/11053666.html 假如两个类型X和Y具有特殊关系,X类型的每个值都能转换成Y类型。我们将I向I的转换称为协变转换。反之我们将I向I的转换称为逆变转换。 简单的举个例子: List str; List obj; 我们知道在C#中所有引用类型都直接或间接地继承自Object类,所有str... 阅读全文
posted @ 2020-06-20 09:09 司徒无名 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 泛型,字面意思就是泛泛而谈的广泛形状,就是偷懒的典型。不过,程序员和工程师们,甚至科学家们发明东西并不是完备考虑的,都是线性思维,先发明出来工具,然后有漏洞再弥补。泛型就是为了省力气发明的。副作用我不知道,但是以后肯定有的。 K用string填充 ,就是string类型。 接口泛型 namespace fanxinjiekou { class Program ... 阅读全文
posted @ 2020-06-19 16:42 司徒无名 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2020-06-16 17:28 司徒无名 阅读(476) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace delegateExample { delegate void MyDel(int value); //定义委托 ... 阅读全文
posted @ 2020-06-14 13:12 司徒无名 阅读(205) 评论(0) 推荐(0) 编辑