请有人帮助解决以下错误:
可访问性不一致:属性类型“Test.Delivery”比属性“Test.Form1.thelivery”更难访问
private Delivery thedelivery;
public Delivery thedelivery
{
get { return thedelivery; }
set { thedelivery = value; }
}
由于不一致的错误消息,我无法运行该程序。
这是我的交付课程:
namespace Test
{
class Delivery
{
private string name;
private string address;
private DateTime arrivalTime;
public string Name
{
get { return name; }
set { name = value; }
}
public string Address
{
get { return address; }
set { address = value; }
}
public DateTime ArrivlaTime
{
get { return arrivalTime; }
set { arrivalTime = value; }
}
public string ToString()
{
{ return name + address + arrivalTime.ToString(); }
}
}
}