Retrieve all environment variables targeted at the process
using System;
using System.Collections;
class MainClass
{
public static void Main()
{
IDictionary vars = Environment.GetEnvironmentVariables(
EnvironmentVariableTarget.Process);
foreach (string s in vars.Keys)
{
Console.WriteLine(s + " = " + vars[s]);
}
}
}