
How to get Command Line argument?
Hello,
Quote:
> How can I get the command line argument for my Vb.net
> application?
\\\
Public Module modMain
Public Sub Main(ByVal astrCmdLineArgs() As String)
Dim i As Integer
For i = 0 To astrCmdLineArgs.Length - 1
Console.WriteLine(astrCmdLineArgs(i))
Next i
End Sub
End Module
///
-- or --
\\\
Public Module modMain
Public Sub Main()
Dim i As Integer
For i = 0 To Environment.GetCommandLineArgs().Length - 1
Console.WriteLine(Environment.GetCommandLineArgs(i))
Next i
End Sub
End Module
///
Regards,
Herfried K. Wagner
--
http://www.mvps.org/dotnet