How do I get and set Environment variables

Posted by: C# Frequently Asked Questions, on 02 Dec 2004 | View original | Bookmarked: 0 time(s)

Use the System.Environment class.Specifically the GetEnvironmentVariable and SetEnvironmentVariable methods.Admitedly, this is not a question specific to C#, but it is one I have seen enough C# programmers ask, and the ability to set environment variables is new to the Whidbey release, as is the EnvironmentVariableTarget enumeration which lets you separately specify process, machine, and user. Brad Abrams blogged on this way back at the start of this year, and followed up with a solution for...

Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 5829 | Hits: 216

Similar Posts

  • Oredev Wrap-Up more
  • MSDN Guidance on ASP.NET MVC vs WebForms and its Impact on my EF + ASP.NET Work more
  • Designer v Xaml v Code more
  • A RouteHandler for IHttpHandlers more
  • New Entity Framework Feature CTP for VS2010 Beta 2 more
  • Data-binding Telerik CoverFlow for Silverlight + some Routed Commands goodness more
  • The ESRI Dev Summit 2010 hosted in Palms Springs CA is open for registration. more
  • MVC or Web Forms? A Dying Question more
  • WcfTestClient with Windows Azure more
  • Stumbling through: K2 blackpearl 090x (Part II) more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD