摘要:
说的是C#如何体贴程序员,而非.NET Framework。这是C#对Delegate相关领域下的精微功夫:List<Product> products = Product.GetSampleProducts();foreach (Product product in products.OrderBy(p => p.Name)) //entention method{ Console.WriteLine (product);}上面的代码等价于下面的,如何,C#体贴不?List<Product> products = Product.GetSampleProduct 阅读全文
摘要:
说的是C#如何体贴程序员,而非.NET Framework。这是C#对getter, setter, local variable, nullable下的细微功夫: public string Name {get; set;} ..... var someString=""; .... int? count; .... var result = count ?? 1; ....上面的代码等价于下面的,如何,C#体贴不? ....(不太可能有人不知道吧!) 阅读全文