I\'m using exceptions to validate a control\'s input in Silverlight 4. When I throw an invalid input exception, VS 2010 displays the popup and stops the program. I ignore th
I got [System.Diagnostics.DebuggerHidden()] to work if I also selected
Debug > Options > Debugging > General > Enable Just My Code (Managed only).
I access the Excel object model a lot, and I really like to be able to run the debugger and catching all exceptions, since my code normally is exception less. However, the Excel API throws a lot of exceptions.
// [System.Diagnostics.DebuggerNonUserCode()] works too
[System.Diagnostics.DebuggerHidden()]
private static Excel.Range TrySpecialCells(Excel.Worksheet sheet, Excel.XlCellType cellType)
{
try
{
return sheet.Cells.SpecialCells(cellType);
}
catch (TargetInvocationException)
{
return null;
}
catch (COMException)
{
return null;
}
}