Click here to Skip to main content
15,905,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
i have a string in text and i want to replace it , but the string can't be seen in the text as i think that i have a wrong syntax in it.

string i want to replace is Model":"

replace it with Model":]"

when i tried this line

C#
string Correct = text.Replace("Model\":\">" , "Model\":[\"");


it didn't work ,

any help please

thanks
Posted

C#
string Correct = text.Replace("Model\":\">", "Model\":]\"");
 
Share this answer
 
Try this:

C#
string Correct = text.Replace("Model\':\'>" , "Model\':[\'");
 
Share this answer
 
Comments
NNos2012 13-Mar-13 6:03am    
string OldModel="Model\":\"" ;
string NewModel="Model\":[\"";
string Correct = text.Replace(OldModel, NewModel);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900