Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi
in windows C#.net
in the program i am using the "Directory.GetCurrentDirectory()"
to get the directory path but it was showing error "the name 'Directory' does not exist in the current context"
what is this and how can i avoid the error
other wise is there any way to find out the physical path of our application directory in windows application
Posted

Either:
1. Set using System.IO; in the header OR
2. Use full name like, System.IO.Directory.GetCurrentDirectory()
 
Share this answer
 
Comments
Kunal Chowdhury «IN» 21-Jul-10 9:27am    
Reason for my vote of 5
Correct Solution
Hi,
Did you add "using System.IO" in your program?
 
Share this answer
 
To get the path where the application executable resides use Application.StartupPath
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900