Answer: As with
GETVALUES Method,we can also retrieve the same thing using GETNAMES method.Here,we also have to Loop through Enum values:-
For Each value In [Enum].GetNames(GetType(Active_Inactive))
MessageBox.Show(value)
Next
foreach(string value in Enum.GetNames(typeof(Active_Inactive)))
{
MessageBox.Show(value);
}
Output:-
Active
Inactive
Asked In: Many Interviews |
Alert Moderator