I have a string like this:
"\"Data Source=.; Initial Catalog=dbname; user Id=sa;Password=1;Integrated Security=false\""
But I need to create a string like this:
"Data Source=.; Initial Catalog=dbname; user Id=sa;Password=1;Integrated Security=false"
How can I accomplish this?
This should work:
string myOriginalString = "\"Whatever\"";
MySubString = mystring.Substring(1, mystring.Length - 2);