Bestcomy.net blog

Coding for funny

导航

2005年4月21日

摘要: 想当然的认为 Convert.ToBoolean("1")==true ,结果抛出如下错误:该字符串未被识别为有效的布尔值。 检查 System.Convert.ToBoolean(String) 方法,代码如下:public static bool ToBoolean(string value){ if (value == null) { return ... 阅读全文

posted @ 2005-04-21 15:28 bestcomy 阅读(5012) 评论(5) 推荐(0) 编辑