April 2008
Intermediate to advanced
704 pages
17h 49m
English
Problem
You need to access the arguments that were specified on the command line when your application was executed.
Solution
Use a signature for your Main method that exposes the command-line arguments as a String array. Alternatively, access the command-line arguments from anywhere in your code using the Shared members of the System.Environment class.
How It Works
Declaring your application's Main method with one of the following signatures provides access to the command-line arguments as a String array:
Public Shared Sub Main(ByVal args As String()) End Sub Public Shared Function Main(ByVal args As String()) As Integer End Sub
At runtime, the args argument will contain a string for each value entered on ...
Read now
Unlock full access