.net - C# Automatic Properties -- setting defaults -
what's easiest/straight-forward way of setting default value c# public property?
// how set default this?
public string myproperty { get; set; }
please don't suggest use private property & implement get/set public properties. trying keep concise, , don't want argument why that's better. thanks.
set default in constructor:
this.myproperty = <defaultvalue>;
Comments
Post a Comment