Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DefaultValue
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00755843
Message ID:
00756259
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
When working with enums, you need to write additional attributes to get what you are looking for. Here is the code:
<TypeConverter(GetType(EnumConverter)), DefaultValue(GetType(MyEnum), "Option1")>  _
Public Shadows Property MyProp() As MyEnum
   Get
      Return MyVar
   End Get
   Set(ByVal value as MyEnum)
      MyVar = value
   End Set
End Property
>"DefaultValue(MyEnum.Option1)" _
>public shadow property MyProp () as MyEnum
>> get
>> return MyVar
>> end get
>> set(byval value as MyEnum)
>> MyVar = Value
>> end set
>>end property
>
>i wrote the first instructions between quotes because it seems like this editor just erase the previous post first instruction. instead of less than sign and more than sign.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform