I have the following code:
我有以下代码:
public class Test
{
public static void Main()
{
List<Person> list = new List<Person>();
Person person = new Person() { Name="Chris" };
list.Add(person);
person = new Person(){ Name="Wilson the cat" };
list.Add(person);
Console.WriteLine(list[0].Name);
Console.WriteLine(list[1].Name);
Console.ReadLine();
}
}
public class Person
{
public string Name {get;set;}
}
public c