Sunday, July 1, 2018

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.

can you explain the difference btw the code Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team