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
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

false Literal (C# Reference)

Represents the boolean value false.

// cs_keyword_false.cs
using System;
class TestClass
{
    static void Main() 
    {
        bool a = false;
        Console.WriteLine( a ? "yes" : "no" );
    }
}

Output

 
no

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

  • 2.4.4.1 Boolean literals

Community Additions

ADD
Show:
© 2015 Microsoft