How do I get %LocalAppData% in c#?

Solution 1:

If you would like to use an enumeration, try the following:

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)

Using this technique, you can also find all other Window's file paths (i.e Program Files, My Documents, etc).

Solution 2:

Environment.GetEnvironmentVariable("LocalAppData") for C#, since Visual Studio isn't a language, unless you're looking to get that variable in one of the VS dialogs or something.