Is it possible to set a default value without the body of a property? Preferably with annotations.
[SetTheDefaultValueTo(true)] public bool IsTrue { get; set; }
Old thread. Looks like Microsoft heard and this feature is available in .Net Framework 4.6+ (C# 6+) You can use it like
public string MyValue { get; set; } = "My Default";