Avatar of rutledgj
rutledgj

asked on 

command line arguments in vb

dumb and simple question. I've created a console app and want to read in command line arguements.  Main looks like this:

 Dim s() As String = System.Environment.GetCommandLineArgs()

        For i As Integer = 1 To UBound(s)
            Console.WriteLine(s(i) & vbCrLf)
        Next

        Console.ReadLine()

in properties/debugger I'm passing in this:

"hello","world","you","are","cruel"

when I run it s(1) contains the entire list of words. I expected each word to be in its own array position.

Can someone tell me what I'm doing wrong here?
Visual Basic.NET

Avatar of undefined
Last Comment
Frosty555

8/22/2022 - Mon