Zayko in the Net

Personal blog of Vitaly Zayko

NAVIGATION - SEARCH

How to get some User environment information? (C#)

Use System.Environment namespace to get lot of information about your user. Just few examples:

 

string userName = System.Environment.UserName;
string machineName = System.Environment.MachineName;
OperatingSystem osVersion = System.Environment.OSVersion;
string userDomainName = System.Environment.UserDomainName;

Add comment