Get the arguments from a command line in vb.net

后端 未结 3 1781
轮回少年
轮回少年 2021-01-15 09:50

Is it possible to return the arguments from the processPath in this example?
This might make more sense, sorry.

Dim processName As String

D         


        
3条回答
  •  别那么骄傲
    2021-01-15 10:25

    A simple (and clean) way to accomplish this would be to just modify your Sub Main as follows,

    Sub Main(args As String())
       ' CMD Arguments are contained in the args variable
       Console.WriteLine("GetCommandLineArgs: {0}", String.Join(", ", args))
    End Sub
    

提交回复
热议问题