Here’s a sweet and simple function that processes the command line arguments of a VB.Net application and returns a HashTable full of key-value pairs.
' This code is published under the University of Illinois Open Source License
' Author: Edward Delaporte
Private Function GetCommandLineArguments() As Hashtable
Dim args As Hashtable
Dim rawArgs As Array
args = New Hashtable
rawArgs = Environment.GetCommandLineArgs()
For Each arg As String In rawArgs
Dim key As String = ""
Dim val As String = ""