摘要: public static class MyExtensionMethods { public static IEnumerable<Product>FilterByCategory( this IEnumerable<Product> productEnum, string categoryParam) { foreach(Product prod in productEnum) { if(prod.Category == categoryParam) ... 阅读全文
posted @ 2012-03-14 16:33 HWwayne 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2012-03-14 16:09 HWwayne 阅读(114) 评论(0) 推荐(0) 编辑