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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -