W
Wolf
Hi all
Who can Help me with this one?
if I have this Enums:
#region Title
public enum Title: short
{
NA = 0,
Mr = 2,
Adv = 3,
Brig = 4,
Dr = 5,
Genl = 6,
Prof = 7,
Miss = 8,
Mrs = 9,
Adm = 10,
Rev = 11,
Ms = 12,
}
Now I want to take the textbox.text and loop through the enums(Not the
value) to check if it exist in my enums
Something like this:
Public bool DoesTitle Exist
{
blnValid = false
For each enum
{
if (textbox.text == enum.name(Example: "MR"))
return true
break
}
return blnValid ;
}
}
Thanks a mill for those who can help
Who can Help me with this one?
if I have this Enums:
#region Title
public enum Title: short
{
NA = 0,
Mr = 2,
Adv = 3,
Brig = 4,
Dr = 5,
Genl = 6,
Prof = 7,
Miss = 8,
Mrs = 9,
Adm = 10,
Rev = 11,
Ms = 12,
}
Now I want to take the textbox.text and loop through the enums(Not the
value) to check if it exist in my enums
Something like this:
Public bool DoesTitle Exist
{
blnValid = false
For each enum
{
if (textbox.text == enum.name(Example: "MR"))
return true
break
}
return blnValid ;
}
}
Thanks a mill for those who can help