//用代码分离模型Test类继承Page类
public class Test:Page
{
public string subject;
//建立构造函数
public Test(string subject)
{
this.subject = subject;
}
public static void Read()
{
//建立对象,为什么出错,重载“Test”方法未获取“0”参数,
Test ne = new Test("word1");
}
}
...全文
1588打赏收藏
类的构造函数问题??
//用代码分离模型Test类继承Page类 public class Test:Page { public string subject; //建立构造函数 public Test(string subject) { this.subject = subject; } public static void Read() { //建立对象,为什么出错,重载“Test”方法未获取“0”参数, Test ne = new Test("word1"); } }