Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Employee
- {
- public int Id { get; set; }
- public string Name { get; set; }
- }
- IList<Employee> EmpList ;
- Or
- List<Employee> EmpList ;
- IList<Employee> EmpList = new List<Employee>();
- List<Employee> EmpList = new List<Employee>();
- IList<Employee> EmpList = new IList<Employee>();
- //this will not compile
- IList<Employee> EmpList = new IList<Employee>();
- //this is what you're really looking for:
- List<Employee> EmpList = new List<Employee>();
- //but this will also compile:
- IList<Employee> EmpList = new List<Employee>();
- [SerializableAttribute]
- public class List<T> : IList<T>, ICollection<T>,
- IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>,
- IEnumerable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement