// Definitely true operator. Returns true if the operand is True, false // otherwise. public static bool operator true(DBBool x) { return x.value > 0; } // Definitely false operator. Returns true if the operand is False, false // otherwise. public static bool operator false(DBBool x) { return x.value < 0; }
C# bool true, false 操作符重载,用在 if, while等语句中
最新推荐文章于 2024-09-10 09:18:11 发布