Bug in VS.NET Debugger (C#) in exception block
Yaroslav,
This is a well known bug in VS.NET. Hopefully they will slate it in the
next service pack/patch for VS.NET.
--
- Nicholas Paldino [.NET MVP]
Quote:
> Hi,
> I found that VS.NET De{*filter*} always makes wrong step
> over into exception block.
> In the example below during debugging a de{*filter*} steps
> into line with "throw new AppException();" when r == 0.
> The final code works fine, but it's confusing during
> debugging to see it.
> Best regards,
> Yaroslav.
> using System;
> namespace TestConsoleApp
> {
> public class AppException: ApplicationException
> {
> public AppException(){}
> }
> class Class1
> {
> [STAThread]
> static void Main(string[] args)
> {
> int r=0;
> bool result=false;
> try
> {
> if(r==0){
> r +=1;
> result = true;
> }else{throw new AppException(); //!!!!}
> }
> catch(AppException ex)
> { result=false; }
> catch(Exception ex)
> { result=false; }
> }
> }
> }