Please can someone help with the following error:
Inconsistent accessibility: property type 'Test.Delivery' is less accessible than property 'Test.Form1.thelivery'
private Delivery thedelivery;
public Delivery thedelivery
{
get { return thedelivery; }
set { thedelivery = value; }
}
I'm not able to run the program due to the error message of inconsistency.
Here is my delivery class:
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(); }
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…