C# language feature:

  • Auto property initializers

applies to

  • Auto-Implemented properties

benefit

  • Allows initialization expressions to set the initial value of an auto-property.

how to use

  • After the auto-implemented properties declaration body insert = and value followed by ;

example:

        public string Name { get; set; } = "Jeff";