C#编程中,出现 不包含采用“2”参数的构造函数的错误 怎么改?
classPCBClass{privatestaticintprogID=0;publicstaticintProgID{get{returnPCBClass.progI...
class PCBClass
{
private static int progID = 0;
public static int ProgID
{
get { return PCBClass.progID; }
//set { PCBClass.progID = value; }
}
private int priorNum;
public int PriorNum
{
get { return priorNum; }
set { priorNum = value; }
}
private int cpuTime;
public int CpuTime
{
get { return cpuTime; }
set { cpuTime = value; }
}
private int needTime;
public int NeedTime
{
get { return needTime; }
set { needTime = value; }
}
private string progStatus;
public string ProgStatus
{
get { return progStatus; }
set { progStatus = value; }
}
PCBClass(int priorNUM,int needTime)
{
progID++;
this.priorNUM = priorNUM;
this.cpuTime = 0;
this.needTime = needTime;
this.progStatus = "W";
}
------------------------
static void Main(string[] args)
{
PCBClass p1=new PCBClass (9,3); } 展开
{
private static int progID = 0;
public static int ProgID
{
get { return PCBClass.progID; }
//set { PCBClass.progID = value; }
}
private int priorNum;
public int PriorNum
{
get { return priorNum; }
set { priorNum = value; }
}
private int cpuTime;
public int CpuTime
{
get { return cpuTime; }
set { cpuTime = value; }
}
private int needTime;
public int NeedTime
{
get { return needTime; }
set { needTime = value; }
}
private string progStatus;
public string ProgStatus
{
get { return progStatus; }
set { progStatus = value; }
}
PCBClass(int priorNUM,int needTime)
{
progID++;
this.priorNUM = priorNUM;
this.cpuTime = 0;
this.needTime = needTime;
this.progStatus = "W";
}
------------------------
static void Main(string[] args)
{
PCBClass p1=new PCBClass (9,3); } 展开
展开全部
构造函数如下声明:
public PCBClass(int priorNUM, int needTime)
{
progID++;
this.priorNum = priorNUM;
this.cpuTime = 0;
this.needTime = needTime;
this.progStatus = "W";
}
public PCBClass(int priorNUM, int needTime)
{
progID++;
this.priorNum = priorNUM;
this.cpuTime = 0;
this.needTime = needTime;
this.progStatus = "W";
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询