Set default values for properties (weblogs.asp.net)
submitted by
djsolid(375) 1 year, 4 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: 24
tags:
C# another
Everyones tags:
Your Tags: