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

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -