+ 2
Advanced boolean possible in C#?
In Cobol its possible to make a kind of boolean with multiple options. You create a variable that you can move a character to and than you can have levels below that will become true or false. Char variable boolean is-a boolean is-b boolean is-c ....etc..... If you move "a" to the variable, is-a will become true and the others become false. I have just startet to learn C# and is wondering if you can do something like this in C# also? So far I can only find regular booleans, but if you have a lot of options something like this would be nice.
5 odpowiedzi
+ 2
That type of boolean is not available in C#.
+ 1
I had no idea that COBOL had advanced booleans of that sort.
+ 1
Usman Muhammed don't spam
0
Is the flag attribute what you are looking for ?
https://www.dotnetperls.com/enum-flags