get the path of %AppData% in C#
To get the AppData directory, it's best to use theGetFolderPath
method:Example
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Note: You must add
using System
if not present.