1.对象初始化器 在调用构造函数时直接初始化对象。 public class Student{ public string Name; public int Age; public bool Gender;}Student stu=new Student{N ...
1.对象初始化器
在调用构造函数时直接初始化对象。
public class Student{ public get='_blank'>string Name; public int Age; public bool Gender;}Student stu=new Student{Name="zhangsan",Age=10,Gender=false};
原标题:第三章知识点归纳
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。