List all Environment Variables

The system variables are exposed through the GetEnvironmentVariables method in the System.Environment class.

var environmentVariables = System.Environment.GetEnvironmentVariables();foreach (var ev in environmentVariables){      DictionaryEntry de = (DictionaryEntry) ev;      Console.WriteLine(string.Format("Key: {0}, Value: {1}", de.Key, de.Value));      Console.WriteLine();}
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts