Finding folders in .NET

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top