This documentation is archived and is not being maintained.

3.2 External Source Directives

Visual Studio .NET 2003

A source file may include external source directives that indicate a mapping between source lines and text external to the source. External source directives have no effect on compilation and may not be nested. For example:

Imports System

Module Test
    Sub Main()
#ExternalSource("c:\wwwroot\inetpub\test.aspx", 30)
        Console.WriteLine("In test.aspx")
#End ExternalSource
    End Sub
End Module
Start ::= [ ExternalSourceElement+ ]
ExternalSourceElement ::= ExternalSourceGroup | LogicalLine
ExternalSourceGroup ::=
   # ExternalSource ( StringLiteral , IntLiteral ) LineTerminator
   [ LogicalLine+ ]
   # End ExternalSource LineTerminator

See Also

3.1 Conditional Compilation | 3.3 Region Directives | #ExternalSource Directive (Visual Basic Language Reference)

Show: