Introduction

In this article we will have a detailed article on System.Environment. Why is it so serious to have it? I don't know about you, but my personal experience says that, knowing your users is as important as knowing your user's environment.

Actually, this class will provide you accessibility to your user's environment.

Background

If you are familiar with your computer then, it is enough for you to deal with it.

Why do I Need It?

Suppose you have a solution file in which you want to save an x-file on user's environment. Then, you must know the partitioned structure of the user's computer. If you want to save a file in My Documents, then you must know the actual path of the My Documents folder.

To do this, you want something that lets you know about this.

For this, we have a class, Environment, in the System namespace of the .NET Library.

Architecture of Environment Class

All the methods and properties are static in nature. The following are the methods:

The following are some more static methods:

Here, we have tried to get the path of My Documents.

Output

I have an enclosed Solution file that has an output like:

 Environment Class