Enumeration for months?
Posted on 2006-07-20
Hi all, I'm trying to convert a string value selected from a drop down control to a numeric value and having trouble. List of values are the months, spelled out (January, February,...). When the user selects one of these, I want to be able to convert this TimeFrame.SelectedValue to an int, January = 1, Feb =2.... integer variable is monthstart.
I don't have much (ok, any) experience with enumerations, but from what I do understand about the language, this is probably way to go. How can I make the conversion??
Any help would be appreciated,
Thanks in advanced