Boolean in C#
The base class is System.ValueType, System.Object.
Assembly: Mscorlib (in Mscorlib.dll)
Instances of this type have a resulting value as true or false.
It is similar to bool as in other programming languages and you can find an example on the same in C# below.
Bool.cs
class zzz
{
static void Main()
{
bool ii;
ii=true;
if ( ii )
{
System.Console.WriteLine (”Hi”);
System.Console.WriteLine (”Bye”);
}
}
}
Public methods for the same include : CompareTo, Equals, GetHashCode, GetType, GetTypeCode, Parse, ToString.
More about boolean structure can also be found out on the msdn site at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystembooleanclasstopic.asp
Related posts