Reputation: 586
I want to access the current directory like below "E:WindowsFormsApplication17
but i am getting the directory as like below "E:\\BugBursters\\BuildUtility\\WindowsFormsApplication17\\bin\\Debug"
I have used the below code Directory.GetCurrentDirectory()
Please let me know how to resolve this.
Thanks and Regards, Amal Raj
Upvotes: 0
Views: 2271
Reputation: 2180
Use this code :
For get your path :
string sourcePath =System.Reflection.Assembly.GetExecutingAssembly().Location
Upvotes: 2