CSharp examples for Operating System:Environment
use Environment object to get Environment variable
using System;/*from w w w .j a v a 2 s. c o m*/ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Displaying components of Environment object Console.WriteLine("Device name: " + Environment.MachineName); Console.WriteLine("64-bit system: " + Environment.Is64BitOperatingSystem); Console.WriteLine("User name: " + Environment.UserName); } }