There’s no need to cast:
bool result = intValue == 1;
From the docs:
The inclusion of bool makes it easier to write self-documenting code
a bool value is either true or false
1.2.1 Predefined Types (C#)
There’s no need to cast:
bool result = intValue == 1;
From the docs:
The inclusion of bool makes it easier to write self-documenting code
a bool value is either true or false
1.2.1 Predefined Types (C#)