Format Document : wrong indentation for Case Else in VB

SyntaxEditor for WPF Forum

Posted 2 years ago by Mike Deck - Autodesk, Inc.
Version: 22.1.0
Platform: .NET 4.8
Environment: Windows 10 (64-bit)

The Format Document command (EditorCommands.FormatDocument) in a "VB .NET Language add-on" document has a problem with the following code:

If a > 3 Then
  Select Case b
    Case 1
    Case 2
    Case Else
  End Select
End If

The End If will be indented to the same level at the End Select.

If you comment out the Case Else, the formatting works fine.
It also works if you take out the If and End If.

Comments (1)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Mike,

Thanks for letting us know about this.  We've fixed it for the upcoming maintenance release.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.