You can access the command line arguments from anywhere in your code using the Environment class.
In particular, you can use Environment.GetCommandLineArgs:
string name = Environment.GetCommandLineArgs()[1];
Console.WriteLine($"Hello, {name}!");
Note that the first element in the array contains the path of the executable and the arguments passed to the program start with the second element, i.e. at index 1.