Option Strict On
Imports System
Namespace Greeting
Public Class Hello
Public Sub Write(ByVal value As String)
Console.WriteLine("Hello, {0}!", value)
End Sub
End Class
End Namespace
The Visual Basic .NET command-line compiler is a program called vbc.exe that should be in your path once the .NET Framework is installed. All examples in this book assume that the example code exists in the root directory of your hard drive. This assumption is made to improve readability. If the code is not in your hard drive's root directory, you need to specify a fully qualified pathname to the compiled file or compile from the directory where the source code is located. With this in mind, you should be able to compile Example 2-1 to a dynamic link library (DLL) as follows: C:\>vbc /t:library hello.vb The /t: option is short for target, which can be one of the following values:
The Visual Basic .NET command-line compiler is a program called vbc.exe that should be in your path once the .NET Framework is installed. All examples in this book assume that the example code exists in the root directory of your hard drive. This assumption is made to improve readability. If the code is not in your hard drive's root directory, you need to specify a fully qualified pathname to the compiled file or compile from the directory where the source code is located. With this in mind, you should be able to compile Example 2-1 to a dynamic link library (DLL) as follows:
C:\>vbc /t:library hello.vb
The /t: option is short for target, which can be one of the following values:
A console application. If the /t switch is omitted, this is the default value.
A Windows executable.
A DLL.
A module. This value is similar to a .lib file in C++. It contains objects but is not an executable.
As a default, the compiler gives the output file the same name as the file being compiled. Here, a file named hello.dll is produced.