J
Johnny Jörgensen
Does anybody know how to correctly specify the defaultvalue attribute for a
property whose type is an enum.
Example:
Public Enum TestValues
Value1=1
Value2=2
End Enum
<DefaultValue(TestValues.Value1)> _
Public Property TestValue() As TestValues
'Get and set here
End Property
The above doesn't work. When the property has the defaultvalue, it is still
not considered default.
I also tried
<DefaultValue(GetType(TestValues), "Value1")> _
But that doesn't work either....
What am I missing?
/Johnny J.
property whose type is an enum.
Example:
Public Enum TestValues
Value1=1
Value2=2
End Enum
<DefaultValue(TestValues.Value1)> _
Public Property TestValue() As TestValues
'Get and set here
End Property
The above doesn't work. When the property has the defaultvalue, it is still
not considered default.
I also tried
<DefaultValue(GetType(TestValues), "Value1")> _
But that doesn't work either....
What am I missing?
/Johnny J.