public static SqlBoolean Parse(string s)
{
if (null == s)
// Let Boolean.Parse throw exception
return new SqlBoolean(bool.Parse(s));
if (s == SQLResource.s_nullString)
return SqlBoolean.Null;
s = s.TrimStart();
char wchFirst = s[0];
if (char.IsNumber(wchFirst) || ('-' == wchFirst) || ('+' == wchFirst))
{
return new SqlBoolean(int.Parse(s, null));
}
else
{
return new SqlBoolean(bool.Parse(s));
}
}