Hi,
I want to add double quote in c# string.
string searchString = "123";
string inputString = "No matches found for "+ "\""+searchString + "\"";
OutPut: No matches found for "123"
THanks,
Hi,
I want to add double quote in c# string.
string searchString = "123";
string inputString = "No matches found for "+ "\""+searchString + "\"";
OutPut: No matches found for "123"
THanks,
I thing that what you need is string format. For example: string.format("No matches found for \"{0}\"", searchString);
try this
string inputString = "No matches found for "+" "+searchString ;
string inputString = String.Format(@"No matches found for \"{0}\"", searchString);
What you have should produce what your expecting:
No matches found for "123"
You could also try:
string searchString = "123";
string inputString = String.Format(@"No matches found for ""{0}""!", searchString);