C#的get set 可访问性

84 阅读1分钟

    public string Url
{
get
{
return url;
}
private set
{
url = value;
}\

    }

\

在类内部,可读可写;外部,只读。

\