Answer: As name suggests,GetValues method have array values.So we can Loop through Enum Values as:-
//C#
foreach(int value in Enum.GetValues(typeof(Active_Inactive)))
{
MessageBox.Show(value);
}
'VB.Net
For Each value In [Enum].GetValues(GetType(Active_Inactive))
MessageBox.Show(value)
Next
Asked In: Many Interviews |
Alert Moderator