关于c#,请问这里的IEnumerable是什么效果?
Product[]products=newProduct[]{newProduct{Id=1,Name="史丹利螺丝刀",Category="手动工具",Price=15...
Product[] products = new Product[]
{
new Product {Id =1,Name="史丹利螺丝刀",Category ="手动工具",Price = 15m},
new Product {Id =2,Name ="世达工具箱",Category="手动工具",Price =155m}
};
public IEnumerable<Product> GetAllProducts()
{
return products;
} 展开
{
new Product {Id =1,Name="史丹利螺丝刀",Category ="手动工具",Price = 15m},
new Product {Id =2,Name ="世达工具箱",Category="手动工具",Price =155m}
};
public IEnumerable<Product> GetAllProducts()
{
return products;
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询