can you explain the difference btw the code
private IEnumerable<Customer> GetCustomers() { return new List<Customer> { new Customer { Id = 1, Name = "John Smith" }, new Customer { Id = 2, Name = "Mary Williams" } }; }
vs
IList<Customer> customers=new List<Customer> { new Customer { Id=1,Name="john Smith"}, new Customer { Id = 2,Name = "Mary Williams"} };
whats the difference btw these two.
0 comments:
Post a Comment