---
title: "2-2 使用 布尔变量"
author: "kanglecjr"
date: "2009-07-06T10:23:11Z"
tags: ["C", "C#", "C++", "Linq"]
slug: "2-2"
draft: false
lastmod: "2009-07-06T10:23:11Z"
id: 420629
url: "https://kanglecjr.iteye.com/blog/420629"
---

BoolTest

```c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BoolTest
{
    class Program
    {
        static void Main(string[] args)
        {
            bool flagT, flagF;
            flagT = true;
            flagF = false;
            Console.WriteLine("The value of flagT is {0}", flagT);
            Console.WriteLine("The value of flagF is {0}", flagF);
            Console.ReadKey();
        }
    }
}

```


结果：
<span style="color:green">The value of flagT is True
The value of flagF is False</span>

[诚品服饰 英伦男装 无条件退换](http://s.click.alimama.com/a/qvYjdTCFlgg=-13358728)