昇級版的Field, 用起來像普通Field, 但卻有封裝
private int secrete;
選取/重整/封裝欄位
自動產生
public int Secrete
{
get { return secrete; }
set { secrete = value; }
}
使用
Demo demo = new Demo();
demo.Secrete = 3;
Console.Write(demo.Secrete);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment