相关疑难解决方法(0)

可访问性错误C#不一致

我收到列表属性的错误.它说这个列表比财产更容易访问..我不知道为什么我收到这个错误..

//List
private List<Client> clientList = new List<Client>();

//Property
public List<Client> ClientListAccessor
{
    get 
    { 
        return clientList; 
    }
    set 
    { 
        clientList = value; 
    }
}
Run Code Online (Sandbox Code Playgroud)

在此先感谢您的帮助.

c# properties list

5
推荐指数
2
解决办法
7518
查看次数

标签 统计

c# ×1

list ×1

properties ×1