private string _GetAndSet;
public string GetAndSet { get { return _GetAndSet; } set { _GetAndSet = value; } }
private string _SetOnly;
public string SetOnly{ get { return _SetOnly; } set { _SetOnly = value; } }
C#3.0 allows us to use the following syntax which is the equivalent of above.
public string GetAndSet { get; set; }
public string SetOnly{ get; private set; }
No comments:
Post a Comment