c# object default property value

C#
public int X { get; set; } = x; // C# 6 or higher
Source

Also in C#: