I have a Resource text file setupfile.txt
I have added to my project, and I have a method that attempts to read it for a connection string like this:
public static string GetConnectionString()
{
StreamReader rdr = new StreamReader(@"C:\Users..."); // this doesn't cause any errors
StreamReader rdr = new StreamReader(Properties.Resources.setupfile); // this doesn't
mySqlConnectionString = rdr.ReadToEnd();
rdr.Close();
return mySqlConnectionString;
}
As I said before, all the file contains is a connection string and 3 numbers:
server=localhost;database=dcim;uid=root;pwd=LlmD62jL;
1,10,2
However when I attempted to run a test to see if the file contained text, I got the excpetion:
System.ArgumentException: Illegal characters in path
I don't know what's going on?