c# - Get the parameter value of method on exception -
is there way know passed method when exception thrown.e.g; convert.toboolean(string mystring)
when throws formatexception? here want know mystring when exception thrown?
you should using boolean.tryparse
. can say
bool value; if(!boolean.tryparse(mystring, out value)) { // didn't parse } // parsed
Comments
Post a Comment