An Integer containing the line number
Indicates the line number on which an error occurred
Erl returns the line number only if one has been provided in the source code.
If the error occurs on a line that does not have a line number, Erl returns 0.
Erl is not affected by compiler settings. Compiling with the /debug- switch does not prevent Erl from accurately reporting the line number.
Line numbers are rarely used in modern VB code. In VB.NET, line numbers are labels that must be followed by a colon.
Although programmers have been requesting an error-handling function that reports the line number on which an error occurred, Erl has one major limitation: namely, it requires that the developer assign a line number to source code lines in advance.
Erl is not new to VB.NET. It was an undocumented and little known function in previous versions of Visual Basic (and of QBasic as well).
In VB 6, line numbers are distinct from labels, and do not require that any symbol (other than white space) separate them from their lines’ source code. In VB.NET, line numbers are labels that must be followed by a colon.