+ 2

How does this program work? I don't understand. Why 7?

enum Lngs{Java=2, cpp=4, C=6, CS} static void Main(string [] args) { Lngs x=Lngs. CS switch (x) { case Lngs. CS: Console. Write ((int) Lngs.CS); break; } }

10th Oct 2017, 8:17 PM
Валерия
Валерия - avatar
2 ответов
0
I think you need to supply a value for CS in d enum declaration
3rd Jan 2018, 11:38 AM
Raphael Blankson
Raphael Blankson - avatar