Set default values for properties(weblogs.asp.net)
submitted by
djsolid(429) 3 years, 8 months ago
Many times I needed to set a default value for a property.
For example at the property below
public string Property1 {get; set;}
I wanted a default value "Value1". The only way was to create a private field or to set it in code like Property1 = "Value1" somewhere.
|category: C#
|Views: 31
tags:
C# another
Everyones tags:
Your Tags: