c# escape single quote in string code example
Example 1: c# handle single quote inside string
s = s.Replace("'", "\\'")
Example 2: c# escape quotes
var lyrics = @"""Alive"", she cried!"
s = s.Replace("'", "\\'")
var lyrics = @"""Alive"", she cried!"