Multiple choice technology platforms and products

What properties enable you to quickly specify a property of a class without having to write code to Get and Set the property?

  1. Static-Implemented

  2. Implicit

  3. Explicit

  4. Auto-implemented

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Auto-implemented properties, introduced in C# 3.0, enable you to quickly define a property without writing explicit get and set logic. The compiler automatically generates the backing field and getter/setter methods. Syntax is 'public int Property { get; set; }' - reducing boilerplate code.