代表布林值 true。
範例
class TrueTest
{
static void Main()
{
bool a = true;
Console.WriteLine( a ? "yes" : "no" );
}
}
/*
Output:
yes
*/
C# 語言規格
如需詳細資訊,請參閱 C# 語言規格。 語言規格是 C# 語法和用法的決定性來源。
代表布林值 true。
class TrueTest
{
static void Main()
{
bool a = true;
Console.WriteLine( a ? "yes" : "no" );
}
}
/*
Output:
yes
*/
如需詳細資訊,請參閱 C# 語言規格。 語言規格是 C# 語法和用法的決定性來源。