在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
public sealed class clas-s-room { private List<string> student = new List<string>(); private List<string> student1 = new List<string>(); public List<string> Student { get { return student; } set { student1 = value; } } // public List<string> Student = new List<string>(); private string name="xiaoming"; public string Name { get { return name; } // set { name = value; } } } static void Main(string[] args) { clas-s-room students = new clas-s-room { Student = { "a", "b" } }; foreach (var item in students.Student) { Console.WriteLine(item.ToString()); } students.Student = new List<string>() { "c"}; } |
请发表评论