【发布时间】:2010-11-30 18:11:27
【问题描述】:
如果usable 不是True(bool 以外的任何东西),我如何使用下面的代码返回False,目前我的代码抛出异常usable 不是布尔值。
if (!Boolean.Parse(readValue("Useable"))) return true;
return (defined.ContainsKey(key) || (key == "Useable"));
【问题讨论】:
-
你错了啊...拼写不正确...
-
代码来自以前的员工,但我没有发现拼写错误!谢谢