Boolean types are used to denote the concepts of "true" and "false". Although this may seem simple, the application is very extensive. As we all know, the computer is actually using binary to represent all kinds of data, that is, no matter what data, in the computer is a binary way of processing and storage. Boolean types represent only two values for logical variables: TRUE and false. In C #, each is represented by a value of true and false two.
Note: in C and C + +, 0来 means "false", and any other non-0 expression means "true". This informal expression has been discarded in C #. In C #, a true value cannot be replaced by any other value other than 0. It is illegal to convert an integer type to a Boolean type without any further conversions between the other integer types and the Boolean types:
BOOL X=1//error, no such notation exists. Can only be written as X=true or X=false.