I have a method that is called frequently and sometimes an exception happens that I catch and handle.
But it is annoying that VS keeps breaking at that code everytime an exception happens, I would like to tell VS to just keep going since the exception is handled anyway.
So I tried using the DebuggerStepThrough attribute but when I insert it in my code I get hundreds of errors.
Is there a way to tell VS to not break on this particulair piece of code when an exception happens
In the code below I dont wont the debugger to break when an exception happens
// some code here
//[DebuggerStepThroughAttribute()]
[DebuggerStepThrough] // this does not compile
try
{
_Table.PrimaryKey = new DataColumn[] { Table.Columns[PrimaryKeyName] };
}
catch
{ // code for when exception happend...
}
// more code here...