how to use get and set properties in c# code example
Example 1: c# get set
public class Employ
{
public string Name { get; set; }
}
Example 2: c# accessors
private string _name = "Hello";
public string Name
{
get
{
return _name;
}
protected set
{
_name = value;
}
}