المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Alternative to Application.StartupPath



C# Programming
05-25-2012, 10:11 PM
I have a class that gets it's startup path using the following:
String myPath = Application.StartupPath;This worked fine with it's own test form, but once I was referring to this class from another class in a different directory, it returns the wrong directory. Is there a c# way to get the directory of the class and not the class that calls it?

Thanks for any help!