Skip to content

C# Feature - field-backed properties

The contextual keyword field lets a property accessor body refer to a compiler-synthesized backing field directly.

This feature was introduced in C# 14. The official Microsoft Learn page for C# 14 is dated November 18, 2025 and states that C# 14 ships with .NET 10 and Visual Studio 2026.

Property validation and normalization often required dropping from an auto-property to a manually declared backing field. C# 14 preserves the convenience of an auto-property while still allowing logic inside the accessor.

private string _message = "";
public string Message
{
get => _message;
set => _message = value ?? throw new ArgumentNullException(nameof(value));
}
public string Message
{
get;
set => field = value ?? throw new ArgumentNullException(nameof(value));
}
  • Use it when an auto-property needs lightweight validation or normalization.
  • Use it to avoid boilerplate backing fields for simple property logic.
  • In a type that already has a member named field, the new keyword can be ambiguous. Use @field or this.field to disambiguate existing identifiers.
  • This is still property logic, not a replacement for complex invariants or domain validation.