Is it possible to read the connection string from a txt file, by using the direct path of the said .txt file witch contains the connection string?
The code is the following, I have this line where I want to read the .txt file:
SqlConnection conn = @"Data Source='C:\Users\Administrator\Desktop\connstring.txt'";
Inside the said txt file is the real connection string which is this:
@"Data Source=.\wintouch;Initial Catalog=bbl;User ID=sa;Password=Pa$$w0rd";
I know this might not be very safe but it's only an academical exercise, trying to learn C# and SQL.