Last active
February 6, 2020 23:47
-
-
Save FlameWert/7c4c7110cc462edee9f4148008f96351 to your computer and use it in GitHub Desktop.
Read a text file inside a folder in a Visual Studio Project: C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
//Traverse two folders up | |
string path = "../../Queries/Stage_Organization.sql"; //sql file is also a text file | |
string query = File.ReadAllText(path); | |
print(query); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Forgot to include main function. I just added it now.