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

razor - Is this a bug in WebMatrix PageData? -

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

c# - Cloning WPF controls and object hierarchies -