Consider a Real World situation that you need to log username, machine name etc. into a log file. I have encountered this scenario many times. Usually finding such information is very tedious job and may require some complicated code to be written.
For such type of information Microsoft .NET provides System.Environment class which provides some static member properties and methods to address most of such scenarios (which turns out to be complicated implementation otherwise).
Read my Full Article Here..