CSharp - Write program to Use the Environment Object

Requirements

Environment object contains information about the computer and the operating system.

Environment.NewLine stores the new line character.

Demo

using System;

class Program//from w  w w .  jav  a  2s. c o m
{
    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);
    }
}

Result