C# Async/await 异步多线程编程
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Threading.Tasks;namespace ConsoleApplication1{ class Program { s …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Threading.Tasks;namespace ConsoleApplication1{ class Program { s …… 阅读全文
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Threading.Tasks;using System.Collections.Concurrent;namespace ConsoleApplication …… 阅读全文
1.依赖依赖就是有联系,有地方使用到它就是有依赖它,一个系统不可能完全避免依赖。如果你的一个类或者模块在项目中没有用到它,恭喜你,可以从项目中剔除它或者排除它了,因为没有一个地方会依赖它。下面看一个简单的示例:/// /// 用户播放媒体文件/// public class OperationMain{ public void PlayMedia() { Media …… 阅读全文
做C#的同学们,都知道,一类只能有一个继承类,但可以实现多个接口。这句话就告诉我们:IEnumerable,ICollection,IList,List区别了// 摘要:// 公开枚举器,该枚举器支持在指定类型的集合上进行简单迭代。//// 类型参数:// T:// 要枚举的对象的类型。[TypeDependency("System.SZArrayHelper" …… 阅读全文
<!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=169433 --> <!-- 在AssemblyInfo.cs加入 [assembly: log4net.Config.XmlConfigurator(ConfigFile = …… 阅读全文
//LD最短编辑路径算法public static int LevenshteinDistance(string source, string target) { int cell = source.Length; int row = target.Length; if (cell == 0) { return row; } i …… 阅读全文