finding a file in a console app

  • Thread starter Thread starter G. Dean Blake
  • Start date Start date
G

G. Dean Blake

I'm writing a console app and want to read an XML file that will be in the
same directory as my .exe file. If I were in a web app I could do:

Dim xtr As New XmlTextReader(server.mappath("myfile.xml"))

but I don't know how to find the path in a console app.

thanks,

G
 
The Application class is a Windows.forms class. I's not available in a
console application.

no?
G
 
well one way to do it is might be

".\whatever"

I have used that in apps and seems to work.

let me know.
 

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

Back
Top