Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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" );

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

© 2015 Microsoft