MSDN Documentation

Namespace: Microsoft.VisualBasic.CompilerServices

Provides classes and members used by the Visual Basic compiler to support language features.

Classes

Structs

Enums

Example Usage (Internal Compiler)


' This is a simplified representation of how the compiler might use these services.
' Actual usage is much more complex and hidden from typical application code.

' Example of implicit type conversion handled by compiler services
Dim implicitNumber As Integer = 123.45 ' Compiler might use a Conversion service

' Example of late binding (less common in modern VB.NET, but illustrative)
Dim dynObj As Object = System.Activator.CreateInstance(Type.GetType("System.Text.StringBuilder"))
Microsoft.VisualBasic.CompilerServices.LateBinding.InvokeMember(dynObj, "Append", Nothing, New Object() {"Hello, World!"})
Console.WriteLine(Microsoft.VisualBasic.CompilerServices.LateBinding.InvokeMember(dynObj, "ToString", Nothing))