true Literal
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

true Literal (C# Reference)

Represents the boolean value true.

// cs_keyword_true.cs
using System;
class TestClass
    static void Main() 
        bool a = true;
        Console.WriteLine( a ? "yes" : "no" );



For more information, see the following sections in the C# Language Specification:

  • Boolean literals

© 2016 Microsoft