How do I make my program check if it launched with given options like this
"C:\\bla\\blabla\\myapp\\myapp.exe" -NoUpdateCheck -NoInt
or
"C:\\bla\\blabla\\myapp\\myshortcut.lnk" -NoUpdateCheck -NoInt
Or just with one option.
您使用System.Environment.Commandline读取完整的命令行并进行解析。
Use a command line argument parser and save yourself from re-inventing the wheel. I use this one for everything : http://commandlinearguments.codeplex.com/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.