public static TryParseInt ( string str, ScalarValue &result ) : bool | ||
str | string | |
result | ScalarValue | |
return | bool |
public static bool TryParseInt(string str, out ScalarValue result)
{
result = null; // default the out value to null
int val;
if (int.TryParse(str, out val))
{
result = new ScalarIntValue(val);
return true;
}
return false;
}