Application.StartupPath in console application

G

Guest

Hi All,

Is there an equivalent for Application.StartupPath in a console application?

kd
 
C

Cor Ligthert

KD,
Is there an equivalent for Application.StartupPath in a console
application?
Can you explain this question a little bit more. I thought that a console
applicion was starting in the path you start it on the console?

Cor
 
J

JohnFol

Yes, but it's a cludge.


Dim strStartupDir As String = CurDir()

MsgBox(strStartupDir)
 
H

Herfried K. Wagner [MVP]

kd said:
Is there an equivalent for Application.StartupPath in a console
application?

\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetEntryAssembly().Location)
End Function
///
 

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