Hi (and thanks in advance)
I have a class called Person that i want to expose a public property called
Numbers. I have a class called PhoneNumbers that is a generic collection of
Phone. All i want to do is be able to access the Numbers property from
within Person. In other words, an individual (Person) can have multiple
PhoneNumbers. I'm getting the following error:
Error 1 Inconsistent accessibility: property type 'PhoneNumbers' is less
accessible than property 'Person.Numbers'
Here's the code:
in Person
.....
PhoneNumbers _phoneNumbers = new PhoneNumbers();
public PhoneNumbers Numbers
{
get {return this._phoneNumbers; }
set {this._phoneNumbers = value; }
}
in PhoneNumbers
....
List<Phone> _phoneList = new List<Phone>();
pubilc List<Phone> Phone
{
get { return this._phoneList; }
set { this._phoneList = value; }
}