This code will show list of Environment Variables in Windows:


foreach (DictionaryEntry de in Environment.GetEnvironmentVariables())
{
listBox1.Items.Add(de.Key + " = " + de.Value);
}

Do not forget to include this:

using System.Collections; // for DictionaryEntry

VN:F [1.1.6_502]
Rating: 0.0/5 (0 votes cast)
Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati

Related posts:

  1. Visual SourceSafe Programming
  2. Filter Listbox based on Textbox entry
  3. Build DateTime from values
  4. SharePoint Server & Designer 2007 video tutorials
  5. Programatically get list of Installed Programs