Access the command-line arguments directly through Environment.CommandLine : Environment : Development C# Examples


C# Examples » Development » Environment »

 

Access the command-line arguments directly through Environment.CommandLine









    
using  System;

class  MainClass
{
        public  static  void  Main(string[]  args)
        {
                Console.WriteLine(Environment.CommandLine);

                foreach  (string  s  in  Environment.GetCommandLineArgs())
                {
                        Console.WriteLine(s);
                }
        }
}
    
   
  
   



Output

main
main


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Environment