Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

C# break is converted to Exit Try in While-loop with nested Try-Catch-block #182

Open
@dgrunwald

Description

@dgrunwald

SD-1757, originally created on 11/12/2010 20:51:43 by Siegfried Pammer

This code:

public class Class1
{
    public Class1()
    {
        while (true) {
            try {
                break;
            } catch (Exception) {
                
                throw;
            }
        }
    }
}

is converted into VB:

Public Class Class1
        Public Sub New()
            While True
                Try
                    Exit Try ' Should be Exit While
                Catch generatedExceptionName As Exception

                    Throw
                End Try
            End While
        End Sub
    End Class

break should be converted into Exit While in this case.


Comment from Daniel Grunwald on 4/12/2012 13:30:12:
Same with 'continue;' inside the catch block.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions