S
shapper
Hello,
I have an enumeration as follows:
public enum RoleType {
Administrator,
Collaborator,
...
}
How can I loop through each item in the enumeration and use it's
value? I was trying the following:
foreach (RoleType role in RoleType) {
Roles.CreateRole(role.ToString());
}
This is not working.
Thanks,
Miguel
I have an enumeration as follows:
public enum RoleType {
Administrator,
Collaborator,
...
}
How can I loop through each item in the enumeration and use it's
value? I was trying the following:
foreach (RoleType role in RoleType) {
Roles.CreateRole(role.ToString());
}
This is not working.
Thanks,
Miguel