Microsoft.VisualBasic Namespace

The Microsoft.VisualBasic namespace contains classes that support the Visual Basic Runtime. These types provide functionality that's built into the Visual Basic language, such as legacy string manipulation, type conversion, interaction with the operating system, and more. While primarily for compatibility, many functions are still useful in C# or other .NET languages.

Key Types

NameCategoryDescription
StringsClassProvides legacy string manipulation functions.
InteractionClassMethods for interacting with the user and the environment.
ConversionsClassType conversion helpers used by the VB compiler.
FileIOModuleFile system I/O utilities.
CompilationModuleRuntime compilation support.

Sample Usage

// VB.NET
Dim result As String = Microsoft.VisualBasic.Strings.StrReverse("Hello")

// C# using VisualBasic runtime
using Microsoft.VisualBasic;
string reversed = Strings.StrReverse("Hello");

Related Topics