Skip to content
Rain Hu's Workspace
Go back

[C#] Property getter/setter access separate 訪問權限分離

Rain Hu

1. getter/setter 的訪問權限分離

private string text;
public string Text
{
    get { return text; }
    set { text = value; }
}
private string text;
public string Text
{
    get { return text; }
    private set { text = value; }
}

Share this post on:

Previous
[C#] Namespace Alias 命名空間別名
Next
[C#] static class 靜態類別