This is my first windows form application.
I need to work with folders that I have created in my project and I need to access the Data folder where I put .txt files.
I try :
string fileName = @"Data\TextFile1.txt";
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
but i keep receiving this error :
impossible find part of path.
How can I combine the folder's path with file's name so when I release the project all works well?
This is what I do in an asp.net application:
Path.Combine(HttpRuntime.AppDomainAppPath, "Folder/FileName.txt");