Line continuation character '_' must be preceded by at least one white space and must be the last character on the line

You can use the line-continuation character, which is an underscore (_), to break a long line of code over several lines in your file. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return). For example:

Dim books As XDocument = _  
    XDocument.Load(My.Application.Info.DirectoryPath & _  
                 "\..\..\Data\books.xml")  

Error ID: BC30999

To correct this error

  1. Ensure that the line continuation character (_) is the last character on a line of code.

  2. Ensure that there is a space before the line continuation character, separating it from any other code on the line.

See also