Last Updated: May 17, 2026
The required modifier (C# 11) tells the compiler that a property or field has to be set when the object is created, with the rule enforced at the call site rather than buried inside a constructor. It's the missing piece between init-only properties (which made object initializers safe for immutable types) and full safety (where forgetting to set a value becomes a compile error, not a NullReferenceException at runtime). This lesson covers how required works, how it interacts with init, set, constructors, records, inheritance, and JSON deserialization, and when to reach for it instead of a long constructor parameter list.