miaStringa = miaStringa.Replace("'","''");

ti faccio notare che replace non modifica la stringa cui è applicato ma ne crea una nuovaa