16,549
社区成员
发帖
与我相关
我的任务
分享
Private Function GetCommandLineArg(ByVal param As String) As String
Dim args As String() = Environment.GetCommandLineArgs()
Dim index As Integer = Array.IndexOf(args, param)
If index > -1 AndAlso index < args.Length - 2 Then
Return args(index + 1)
Else
Return Nothing
End If
End Function
Dim password As String = GetCommandLineArg("/p")
string GetCommandLineArg(string param)
{
string[] args = Environment.GetCommandLineArgs();
int index = Array.IndexOf(args, param);
if (index > -1 && index < args.Length - 2)
{
return args[index + 1];
}
else
{
return null;
}
}