An empty string could cause a problem - depends on the source.
And I would think it's more likely a bool you want as Jay says:
string stringvalue = "-1"; bool val = (stringvalue == "-1") ? true : false;
No comments:
Post a Comment