摘要:
先说原始的构造函数:案例1:<类的重载构造函数>class Program { static void Main(string[] args) { Person oneperson1 = new Person(15,"jack",160.00);//调用第一个构造函数 Console.WriteLine(oneperson1);//这里隐式ToString()方法 Person oneperson2 = new Person("jack", 15,160.00);//调用第二个构造函数 ... 阅读全文
摘要:
案例3:<案例分析>namespace _2011._12._19{ class Program { static void Main(string[] args) { Box box = new Box(10, 20, 30); Display(box[0],box[1],box[2]); Console.WriteLine(box["High"]); ... 阅读全文