I wanted to assign an array value to enum.
for ex:-
string[] ArrayControl = new string[3] {'simple','standard','advanced'};
public enum Control
{
simple,
standard,
advanced
}
Can we apply array value to enum dinamically?
I wanted to assign an array value to enum.
for ex:-
string[] ArrayControl = new string[3] {'simple','standard','advanced'};
public enum Control
{
simple,
standard,
advanced
}
Can we apply array value to enum dinamically?
Are you looking for this:
ArrayControl = Enum.GetNames(typeof(Control));
This will populate ArrayControl with all the names of enum Control. You can then bind your drop down list to ArrayControl.