0
Enum in loops?
can i use for loop to have the elements of for example enum Days as output?
5 ответов
+ 2
Yes you can use example foreach and in the loop and you can assign the value through this sample
var enum=
Enum.GetValues(typeof(yourEnum)).Cast<yourEnum>()
+ 1
thank you very much for the examples.
+ 1
I just post an example of foreach loop with enum. Hope this can help.
0
Please help again. i tried to create the foreach loop with an enum Days{Mon, Tue, Wen, Thu, Fri, Sat, Sun}, but it drops a lot of error. I dont really understand, How i coud debug it.
0
Thanks for the code, now i see my mistake.