Issue
I wonder how one can access the command line arguments, given this is all that gets generated in the Program.cs
file by the new template for Console Application in Visual Studio 2022:
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Moreover, there is no args
variable in scope.
So how to access CLI arguments?
Solution
Apparently one needs to add some code to fireup the IntelliSense. I.e., if you try to access args
as a first thing in your program you'll be supprised (like myself):
However, couple of lines later:
Voila!
Answered By - Bozhidar Stoyneff Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.