我的班级的构造函数有问题。我有一个名为 DASHBOARD 的类,它继承自它的基类 LINKS。
public class Link
{
private Page aPage;
public Page myPage
{
get { return aPage; }
set { aPage = value; }
}
public Link(int buildingID, Page mypage)
{
myPage = mypage;
}
}
public class Dashboard : Link
{
private int abuildingid;
private int acustomerid;
public int BuildingID
{
get { return abuildingid; }
set { abuildingid = value; }
}
public int CustomerID
{
get { return acustomerid; }
set { acustomerid = value; }
}
public Dashboard(int buildingid, int customerid, Page mypage)
: base(buildingid, mypage)
{
BuildingID = buildingid;
CustomerID = customerid;
}
当我写我的代码时
新仪表板(buildingID、customerID、this)
我收到一个错误:错误 14:“仪表板”不包含采用 3 个参数的构造函数
我究竟做错了什么?