how to get %LocalAppData% in visual studio c#?
+2
A:
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.
Kristopher Ives
2009-12-30 13:05:57
I have edited my post.Environment.GetEnvironmentVariable("LocalAppData") for C# works.Thanks
Dee
2009-12-30 13:40:47
A:
If you're dealing with native code, the APIs you need to read up on are SHGetKnownFolderPath (Vista and later) or SHGetFolderPath (2000/XP).
Bob Moore
2009-12-30 13:43:07
Hmmm... the C# got added to the question in an edit. So I want to delete this post. But I can't... why can't you delete your own posts, only vote for them to be deleted? This seems like lunacy to me.
Bob Moore
2009-12-30 13:51:12
+2
A:
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).
Blake Blackwell
2009-12-30 13:46:42