true 常值 (C# 參考)
更新:2007 年 11 月
代表布林值 true。
範例
class TrueTest
{
static void Main()
{
bool a = true;
Console.WriteLine( a ? "yes" : "no" );
}
}
/*
Output:
yes
*/
C# 語言規格
如需詳細資料,請參閱 C# 語言規格中的下列章節:
- 2.4.4.1 布林常值
更新:2007 年 11 月
代表布林值 true。
class TrueTest
{
static void Main()
{
bool a = true;
Console.WriteLine( a ? "yes" : "no" );
}
}
/*
Output:
yes
*/
如需詳細資料,請參閱 C# 語言規格中的下列章節: