摘要: ```C#using System;using System.IO;using System.Net;using System.Text;using System.Reflection;using System.Collections;using System.Collections.Generic;using System.Text.RegularExpressions;namespace C_... 阅读全文
posted @ 2020-05-10 23:09 艾孜尔江 阅读(153) 评论(0) 推荐(0) 编辑
摘要: using namespace > System; 放在方法前面的特性 方法过时 给予信用法的提示 开关对方法的调用只需要对一行#define sth 进行注释/取消注释即可。 放在参数前面的特性 调试时常用的特性 其他特性 自定义特性 作者:艾孜尔江;转载或使用请务必表明出处。 阅读全文
posted @ 2020-05-10 22:28 艾孜尔江 阅读(145) 评论(0) 推荐(0) 编辑
摘要: @namespace System; && System.Reflection; 反射指程序可以访问、检测和修改它本身状态或行为的一种能力。 程序集包含模块,而模块包含类型,类型又包含成员。反射则提供了封装程序集、模块和类型的对象。 可以使用反射动态地创建类型的实例,将类型绑定到现有对象,或从现有对 阅读全文
posted @ 2020-05-10 22:09 艾孜尔江 阅读(145) 评论(0) 推荐(0) 编辑
摘要: any是判断列表里面是否有哪怕一个; all是判断列表里面是否每一项都包含; 阅读全文
posted @ 2020-05-10 21:52 艾孜尔江 阅读(2363) 评论(0) 推荐(1) 编辑
摘要: 作者:艾孜尔江 阅读全文
posted @ 2020-05-10 20:51 艾孜尔江 阅读(1261) 评论(0) 推荐(0) 编辑
摘要: 作者:艾孜尔江 阅读全文
posted @ 2020-05-10 20:50 艾孜尔江 阅读(1567) 评论(0) 推荐(0) 编辑
摘要: namespace System.Linq; 使用&&进行多条件查询 也可以直接使用Lambda表达式+扩展方法的写法: 阅读全文
posted @ 2020-05-10 18:10 艾孜尔江 阅读(739) 评论(0) 推荐(0) 编辑
摘要: 声明委托变量的时候在自定义的委托类型前加一个event关键字,就表示这个是事件。 event和普通的委托区别是:event对委托做了作用域上的限制,事件只能在类的内部被调用,在类的外部是无法调用的,有效防止了误调【经典案例:观察者模式——被观察者自己调用自己的方法而不是让观察者全都一一调用,观察者只 阅读全文
posted @ 2020-05-10 17:45 艾孜尔江 阅读(184) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1991547/202005/1991547-20200510171321835-660051568.png) ![](https://img2020.cnblogs.com/blog/1991547/202005/1991547-20200510171639330-1639448860.png) ![](https://i 阅读全文
posted @ 2020-05-10 17:16 艾孜尔江 阅读(145) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1991547/202005/1991547-20200510150026675-1650813099.png) 阅读全文
posted @ 2020-05-10 15:00 艾孜尔江 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 利用下面的方法可以对C 中任何类型的变量、甚至是自定义类型的变量做冒泡排序;原理是使用了C 的Func委托,使用时只要将比较的函数当作参数传进去就能够获取最终的排序结果。 阅读全文
posted @ 2020-05-10 14:38 艾孜尔江 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 介绍 使用 普通委托详解 Action委托详解 c static void Main(string[] args) { //The last parameter in "Func" is the type of return value the method //while the former p 阅读全文
posted @ 2020-05-10 12:16 艾孜尔江 阅读(154) 评论(0) 推荐(0) 编辑
摘要: namespace System.Text.RegularExpressions. 阅读全文
posted @ 2020-05-10 09:53 艾孜尔江 阅读(159) 评论(0) 推荐(1) 编辑
摘要: ```c# static void Main(string[] args) { //How to run C# in VS Code? /* step 0: create a null folder and open it in vscode step 1: dotnet new console step 2: dotnet restore step 3: dotnet run */ Consol 阅读全文
posted @ 2020-05-10 08:57 艾孜尔江 阅读(120) 评论(0) 推荐(0) 编辑