How To get the paht to my current directory?

  • Thread starter Thread starter pc_adv
  • Start date Start date
P

pc_adv

hello,
I am trying to read from a text file like this:

StreamReader sr = new StreamReader(Application.StartupPath);

but because the Application.StartupPath = "C:\Program Files\Microsoft
Office\Office12"
I cant read the file from the add in directory

how can i get the path?
 
This really should be posted to a C# or .NET group, it has nothing at all to
do with Outlook.

Use Assembly.GetExecutingAssembly().Location to get the location where the
code is installed.
 
Back
Top