Archive for March, 2004

C# Get environment info

By admin - Last updated: Monday, March 1, 2004

using System; public static void GetEnvironmentInfo() {     Console.WriteLine(”CurrentDirectory: {0}”, Environment.CurrentDirectory);     Console.WriteLine(”MachineName: {0}”, Environment.MachineName);     Console.WriteLine(”OSVersion: {0}”, Environment.OSVersion.ToString());     Console.WriteLine(”SystemDirectory: {0}”, Environment.SystemDirectory);     Console.WriteLine(”UserDomainName: {0}”, Environment.UserDomainName);     Console.WriteLine(”UserInteractive: {0}”, Environment.UserInteractive);     Console.WriteLine(”UserName: {0}”, Environment.UserName);     Console.WriteLine(”CLRVersion: {0}”, Environment.Version.ToString());     Console.WriteLine(”WorkingSet: {0}”, Environment.WorkingSet);     Console.WriteLine(”ExpandEnvironmentVariables: [...]