C# Get the User Profile folder

By [)ia6l0 iii

Use the Environment class to get important and user-specific properties like the User Profile folder.

Use the following line of code to retrieve the userprofile folder:

string userprofileFolder = Environment.GetEnvironmentVariable("USERPROFILE"));

Related FAQs

The following snippet returns the list of logical drives on a system.
C# Get the User Profile folder  (3490 Views)