C# Finding the Path to the Windows AppData Folder

The following sample codes are used to find the paths of the "Local" and "Roaming" folders in "Windows AppData" in the C# programming language.

For the "Roaming" folder..


string appDataRoaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); 

For the "Local" folder..


string appDataLocal = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);     



You May Interest

C# Example of Sum of Even Numbers from 1 to 100

C# How To Find The Average Of 10 Numbers Using A While Loop

C# Finding the Path to the Windows Fonts Folder

C# Finding the Sine of an Angle

Splitting a String By Desired Character in C#