标签:
public class hanshu { public string Num1; public int Num2; //定义两个变量 public void hanshu(string _Num1,int _Num2) //构造函数 { this.Num1 = _Num1; //声明两个变量 this.Num2 = _Num2; } }
重载:
public class hanshu { public string Num1; public int Num2; public void hanshu() { } public void hanshu(string _Num1) { this.Num1=_Num1; } public void hanshu(int _Num2) { this.Num2=_Num2; } public void hanshu(string _Num1,int _Num2) { this.Num1 = _Num1; this.Num2 = _Num2; } }
标签:
原文地址:http://www.cnblogs.com/wu-tong/p/5747548.html