Define Auto Implemented Properties

This is introduced in C#.NET 3.0.

  •  To simplify the syntax of property declaration that contains no extra logic in ―set accessor and ―get accessor, this concept is introduced.
  •  According to this, no code for ―set and ―get accessors needed to write.
  •  No extra variable is needed to be declared.
  •  Syn: accessmodifier datatype propertyname { get; set; }
  •  Ex: public string Name { get; set; }