Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DefaultValue
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00755843
Message ID:
00756259
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform