I’m getting an error with a property for a list. It’s saying the list is less accessible than the property.. I’m not sure why I am getting this error..
//List
private List<Client> clientList = new List<Client>();
//Property
public List<Client> ClientListAccessor
{
get
{
return clientList;
}
set
{
clientList = value;
}
}
Thanks in advance for any help.
Most probably
Clientis not a public class, andClientListAccessoris publically accessible. The caller will have access to the property but wouldn’t know the type it returns.