Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

asp.net core relative file path within console app

using System.IO;

// make sure the file's properties are:
//Build Action: Content
//Copy to Output Directory: Copy if newer
string filePath = (new FileInfo("ContainingFolder/fileName.txt")).FullName;
 
PREVIOUS NEXT
Tagged: #core #relative #file #path #console #app
ADD COMMENT
Topic
Name
2+2 =