Guest noricat Posted October 11, 2002 Posted October 11, 2002 Dear all, I ave a question~ how to get a directory location which my vb.net application be? I need to open a file in my application, so I coding like this: system.io.file.open("c:\xxx\xxx\text.txt") But if I place my application into other directory or drive example "D:", then it will be error :( Any class or method to get the current location that my application at? Thanks Quote
*Gurus* divil Posted October 11, 2002 *Gurus* Posted October 11, 2002 System.Reflection.Assembly.GetExecutingAssembly().Location Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.