摘要:
public static class MyExtensionMethods { public static IEnumerable<Product>FilterByCategory( this IEnumerable<Product> productEnum, string categoryParam) { foreach(Product prod in productEnum) { if(prod.Category == categoryParam) ... 阅读全文
摘要:
public class Product { private string name; public int ProductID { get; set; } public string Name { get { return ProductID + name; } set { name = value; } } public string Description { get; set; } public decimal Price { get; set; } public string Category { set; get; } } publi... 阅读全文