C# language feature:

  • Auto-Implemented properties

applies to

  • class properties

benefit

  • Allows more concise property-declaration when no additional logic is required in the property accessors.

how to use

  • Use the get and set keywords without providing any implementation.

example:

        int Age { get; set; }