Different ways of parsing command line parameters passed to a .NET Core application.
Naive (and not recommended version) can be found here. This example is soley here to show why this is a topic at all. I.e, to do this manually is painful so using existing solutions to solve this problems is highly recommended.
According to the repository website, this is "The best C# command line parser that brings standardized *nix getopt style, for .NET". Somewhat subjective, but certainly a good library to consider and allow for almost all configurations you will ever need. You can find the sample implementation here. For more information, please have a look at the official library website