Turning a single quote into an escaped single quote within a string June 11, 2023 by Tarik Do this so you don’t have to think about it: s = s.Replace("'", @"\'");