Finally, you are also able to access command-line
arguments using the static
GetCommandLineArgs() method of the System.Environment type. The return value of this method is
an array of strings. The first index identifies the name of the application itself, while the remaining
elements in the array contain the individual command-line arguments (note that when using this
approach, it is no longer necessary to define Main() as taking a string array as the input parameter,
although there is no harm in doing so):
static int Main(string[] args)
{
...
Do'stlaringiz bilan baham: