Instead of declaring:
bool one = false;
bool two = false;
bool three = false;
Is it possible to declare something like:
bool one, two, three;
while setting them all to false
?
bool one, two, three = false
cnet
Instead of declaring:
bool one = false;
bool two = false;
bool three = false;
Is it possible to declare something like:
bool one, two, three;
while setting them all to false
?
bool one, two, three = false
Best Answer
For reference you can visit: bool (C# Reference).
But you cannot use it unless
assigned
with values.The same goes with nullable boolean: