C# 3.0 comes with
Automatic properties initialization ,in which we do not have to write properties for variables.
Just write:
public class Person
{
public Person()
{
}
public string FirstName { get; set; }
public string LastName { get; set; }
}
Note:Setting and Getting value are the same.