Posted By

krisdb on 07/28/08


Tagged

c-sharp


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
ddevening


ReplaceSingleQuote


 / Published in: C#
 

  1. public static string ReplaceSingleQuote(string strText)
  2. {
  3. string strReturn = "";
  4.  
  5. if (strText.Length > 0)
  6. strReturn = strText.Replace("\'", "\\'");
  7.  
  8. return strReturn;
  9.  
  10. }

Report this snippet  

You need to login to post a comment.