Export (0) Print
Expand All

true Literal (C# Reference)

Represents the boolean value true.


class TrueTest
{
    static void Main() 
    {
        bool a = true;
        Console.WriteLine( a ? "yes" : "no" );
    }
}
/*
Output:
yes
*/


For more information, see the C# Language Specification. The language specification is the definitive source for C# syntax and usage.

Community Additions

ADD
Show:
© 2014 Microsoft