I have a string. I want to search for a single slash and then replace "\" (single slash) with a "\" (double slash).
string Method1(string s)
{
string upadtedString = s;
if (s.Contains("\\"))
{
//do nothing
}
else if(s.Contains("\"))
{
string s1 = "\";
string s2 = "\\";
upadtedString.Replace(s1,s2);
s = upadtedString;
}
return s;
}
`