In VB.NET, the indent does not increase under an If statement in some conditons

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 2 months ago by Mike Deck - Autodesk, Inc.
Version: 24.1.1
Platform: .NET 6.0
Environment: Windows 10 (64-bit)

To reproduce:

  • start the Visual Basic Editor (.NET Lang. Add-on) demo
  • fix the syntax error on the "Dim errorTest" line
  • above the DemoTest sub, add two functions:
Function SingleArg(r As Double) As Double
	Return r
End Function
Function TwoArgs(r1 As Double, r2 As Double) As Double
	Return r1 + r2
End Function
  • in DemoTest, add this line:
    If TwoArgs(2, 3) > 3 Then
  • Hit Enter

Result: the next line has the same indent as the If line. The problem does not happen if you call SingleArg instead.

If you enter something in the If block and proceed, then Format Document can be used later to fix the indent.

[Modified 2 months ago]

Comments (2)

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

Hi Mike,

Thanks for reporting this.  We found the issue and fixed it for the upcoming v24.1.2 release.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was before the next post in this thread.
Posted 2 months ago by Mike Deck - Autodesk, Inc.

Great, thanks for the fix. I tried it and it works well.

I guess I should have logged this on the .NET addon forum.

[Modified 2 months ago]

Add Comment

Please log in to a validated account to post comments.