C
C#7mo ago
biskit

Need help with finding the filepath of a folder inside the solution without hard coding it

Basically I have a console app that allows users to choose from a bunch of different text files to load from a folder, I want to get the folders path without hardcoding so that anyone can use it in theory
4 Replies
FestivalDelGelato
Directory.EnumerateFiles Method (System.IO)
Returns an enumerable collection of full file names that meet specified criteria.
biskit
biskitOP7mo ago
sorry if my explanation was bad ^^" i more so just want to get the filepath for the folder itself
sibber
sibber7mo ago
well you dont generally ship the code with the app
Anton
Anton7mo ago
you can copy files to the output directory with None in msbuild

Did you find this page helpful?