Accessing Environment Settings : Environment : Development C# Examples


C# Examples » Development » Environment »

 

Accessing Environment Settings









    
using  System;
using  System.Collections;

class  MainClass
{
        public  static  void  Main()
        {
                Console.WriteLine("Environment  Variables");
                foreach  (DictionaryEntry  var  in  Environment.GetEnvironmentVariables())
                        Console.WriteLine("{0}={1}",  var.Key,  var.Value);
                
        }
}
    
   
  
   



Output

Environment Variables
Path=C:\Program Files\Microsoft.NET\SDK\v2.0\Bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Pr
ogram Files\Microsoft Visual Studio 8\VC\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
...
...


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Environment