Passing Arguments to a Console App using C#
In this post, we will create a console app that accepts arguments or switches. In Visual Studio, create a new console app: The args parameter gives us what the user has entered, e.g: sampleapp.exe -something /i dosomething Add some code to print the arguments the user has provided. We will print the first 2 arguments: Now, run the app and provide 2 arguments. We can see when we provide SampleArg1 … Continue reading Passing Arguments to a Console App using C#