Finding folders in .NET

G

Guest

Hi.

I just want to figure out how can I retrieve the following special folders
in C# using .NET:

Application path (eg. c:\program files\my application)
Current user's application data folder (eg c:\documents and
settings\user\application data\my application)
All users' application data dolder (eg c:\documents and settings\all
users\application data\my application)

Thanks
Dr. Jones
 
D

Daniel O'Connell

Hi.

I just want to figure out how can I retrieve the following special folders
in C# using .NET:

Application path (eg. c:\program files\my application)
Current user's application data folder (eg c:\documents and
settings\user\application data\my application)
All users' application data dolder (eg c:\documents and settings\all
users\application data\my application)
try the System.Windows.Forms.Application class, it should cover all of them.

If you are not using Windows.Forms, System.Environment.GetSpecialFolder()
should do what you need, just a litlte more work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top