I populated a combobox with enum values , I created getter/setter to retrive/set these values .I can get the enum value as string but can't convert it to enum value to set the setter part .How to convert a string to the enum value. Thanks
edit : without having to create string properties instead of EnumType propertry .
Last edited by Pirate; Dec 30th, 2003 at 10:24 PM.
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]
Umm , not really what I'm after . Basically , I want to set the value of the EnumProperty (in the zip file above) from the listbox which is string type . I've tried many ways with casting but can't get it to work . There must be a way without having to change the property type . Any other suggestions ?
would you not be better building a struct? my understanding is that enums are set at design time. a struct you can do a lot more with.
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]
Yeah , that's true , but I'm doing it the other way . I group some keywords that I'll use in my app then have a property that is declared as that enum (which can be set/get) . And use public property to get/set that obj . I can't change this implementation because it's based on other things . I solved it but with a little bit lengthy code though I'd loved to shorten that . Anyways ,I appreciate the help .