我在c#中已经这样做了几次,但对于vb.net,我是否使用My.Application.CommandLineArgs如下或有更好的方法吗?
Dim argListArray As New ArrayList
For Each argument As String In My.Application.CommandLineArgs
argListArray.Add(argument)
Next
If argListArray.Count = 5 Then
ImageName = argListArray(0).ToString
ImageAddress = argListArray(1).ToString
ImagePort = argListArray(2).ToString
FileLoc = argListArray(3).ToString
JPEGQuality = argListArray(4).ToString
Else
'TODO invalid # args
End If
答案 0 :(得分:1)
同意......直接使用Materialized
:
My.Application.CommandLineArgs