C# 2.0 allows you to set different accessibility qualifiers for your get and set of a property. This feature is useful when you want to have different accessibility for your get and set.
public class Employee
{
private string _employeeName;
public string EmployeeName
{
public get { return _employeeName; }
protected set { _employeeName = value; }
}
}
Refrence Chris Breisch
No comments:
Post a Comment