I\'m trying to convert the value \"0\" ( System.String ) to its Boolean representation, like:
var myValue = Convert.To
Since it's really a matter of still doing those conversions and such, how about an extension method?
public static class Extensions {
public static bool ToBool(this string s) {
return s == "0" ? false : true;
}
}
and so then you would use it like this:
"0".ToBool();
and now you could easily extend this method to handle even more cases if you wanted.