Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 editor removes line continuation character in Visual Basic source code

Visual Studio 2015 Pro gives the following error:

error BC36716: Visual Basic 9.0 does not support implicit line continuation.

For the following source code:

1     .Line.Points = New UnitPoint() _

2              {

3                New UnitPoint(Offset + OutlineBoxWidth_halph, 0),

4                New UnitPoint(Offset + OutlineBoxWidth_halph, "height"),

5                New UnitPoint(Offset + OutlineBoxWidth, "height")


6               }

When I insert continuation character on lines 2 to 5, the editor removes it when I move the cursor off that line

It used to compile fine but something has changed. What?

like image 970
Joginder S Nahil Avatar asked Oct 25 '15 07:10

Joginder S Nahil


People also ask

What is the line continuation character in Visual Basic?

Use the line-continuation character, which is an underscore ( _ ), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or (starting with version 16.0) a comment followed by a carriage return.

What is the line continuation character?

The line continuation character in IPL and JavaScript is the backslash (\). You use this character to indicate that the code on a subsequent line is a continuation of the current statement. The line continuation character helps you format your policies so that they are easier to read and maintain.


1 Answers

It was <LangVersion> in .vbproj.

like image 184
Joginder S Nahil Avatar answered Oct 24 '22 13:10

Joginder S Nahil