In VB.NET, write a brief description of the process of receiving command line arguments (like Getopt in Perl)

Asked 2 years ago, Updated 2 years ago, 86 views

I would like to implement the process of receiving command line arguments in VB.NET.

Environment.GetCommandLineArgs to examine the arguments one by one.

Is there a way to write command line processing more concisely? Please let me know if there is a class that summarizes command line processing like the Getopt module in Perl.

vb.net getopt

2022-09-29 21:34

1 Answers

I don't think there's anything in the standard library that parses the command-line options yet (although it once appeared in CTP by mistake).
However, some libraries have been created voluntarily, including the .NET version of GetOpt.

  • GetOpt series
    Codeplex has GnuGetOpt.Net, and you can also search nuGet to find some.

  • NDesk.options/Mono.Options
    NDesk options is also used in Mono (source - Authors may also have jpyor installed (from ).It doesn't seem to be the author himself.)
    If you look at the background, you will hear about Perl's GetOpt, so it's worth a look.

  • Other
    Other than that, if you search nuGet and Command Line Parser, you'll find some, so you'd better use one that suits your needs.

GetOpt series Codeplex has GnuGetOpt.Net, and you can also search nuGet to find some.

NDesk.options/Mono.Options
NDesk options is also used in Mono (source - Authors may also have jpyor installed (from ).It doesn't seem to be the author himself.)
If you look at the background, you will hear about Perl's GetOpt, so it's worth a look.

Other
Other than that, if you search nuGet and Command Line Parser, you'll find some, so you'd better use one that suits your needs.


2022-09-29 21:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.