Sorry I got busy with my office work so I didn't saw this
................., (You yourself fill the blank with the suitable word)
Yes I read to the end of the post and I understood it and bellow is how I ask you to do, though your small brain cannot get it.
Application.StarupPath doesn't use Windows Forms nore it return the path as file://c/winnt/.../filename.exe where you cannot use for file loading etc..
It will return the path in a way, which you can create a FileInfo object and use to get almost all the details you need such as directory, directoryName, File Name, Full Path etc,,,,,,,,,,,,,,,,
Other than that it will give the actual path even if you load the assembly using a Shoutcut icon.
Nirosh.
"Frank Rizzo" <no****@nospam.com> wrote in message news:u6**************@TK2MSFTNGP10.phx.gbl...
Dude,
Did you read the post to the end?
Champika Nirosh wrote: Hi,
Use Application.StartupPath
Nirosh.
"Frank Rizzo" <no****@nospam.com> wrote in message
news:eJ**************@tk2msftngp13.phx.gbl...
How to get Application Path?
I can't really use
System.Reflection.Assembly.GetExecutingAssembly( ).GetName().CodeBase
because it returns the path in the file://c/winnt/.../filename.exe
format, which I can't really use to open files, etc...
I also don't want to use System.Windows.Forms.Application.ExecutablePath
because I don't want to include Windows Forms for my console app.