摘要:[LINQ] LINQ to Object 實例02 (LIST)
文章轉自:
http://topic.csdn.net/u/20090201/17/398671D7-D444-4C99-A15C-E1924FCBBB27.html
class Student { public Student(string id, string name, string age, List<string> collection) { this.id = id; this.name = name; this.age = age; this.collection = collection; } private string id; public string Id { get { return id; } set { id = value; } } private string name; public string Name { get { return name; } set { name = value; } } private string age; public string Age { get { return age; } set { age = value; } } private List<string> collection; public List<string> Collection { get { return collection; } set { collection = value; } } }C# code class Student { public Student(string id, string name, string age, List<string> collection) { this.id = id; this.name = name; this.age = age; this.collection = collection; } private string id; public string Id { get { return id; } set { id = value; } } private string name; public string Name { get { return name; } set { name = value; } } private string age; public string Age { get { return age; } set { age = value; } } private List<string> collection; public List<string> Collection { get { return collection; } set { collection = value; } } }