Retrieve a named environment variable : Environment : Development C# Examples


C# Examples » Development » Environment »

 

Retrieve a named environment variable









    
using  System;
using  System.Collections;

class  MainClass
{
        public  static  void  Main()
        {
                Console.WriteLine("Path  =  "  +
                        Environment.GetEnvironmentVariable("Path"));
        }
}
    
   
  
   



Output

Path = C:\Program Files\Microsoft.NET\SDK\v2.0\Bin;
...


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Environment