Wednesday, January 9, 2013

C# .net Convert bool to int

bool theBool = true;
int boolToInt = theBool ? 1 : 0; //1 if theBool is true and 0 if theBool is false
that's it.

Comments

Loading... Logging you in...
  • Logged in as
There are no comments posted yet. Be the first one!

Post a new comment

Comments by