The first poster (and the newbie).
I created a winform application for C #. I added the Documents folder, in which I added 5 PDF files.
In my Form1, I added a button and inside the button click event, I try to get files from this Documents folder.
I googled around and found something like this:
string[] arr = Directory.GetFiles(string path);
But I do not want to "hard code" the path to the "Documents" folder. I would like to know if there is a way (more dynamic) to get the path to the Documents folder.
I also found them:
string path1 = Path.GetDirectoryName(Application.ExecutablePath); string path2 = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
But they always bring me to the \ bin \ Debug folder.
I will take all the help I can get! Thanks!
source share