Escaping single quote in String.Format()
问题 I have been all over the 'tubes and I can't figure this one out. Might be simple. The following String.Format call: return dt.ToString("MMM d yy 'at' H:mmm"); Correctly returns this: Sep 23 08 at 12:57 Now let's say I want to add a single quote before the year, to return this: Sep 23 '08 at 12:57 Since the single quote is a reserved escape character, how do I escape the single quote to get it to display? I have tried double, triple, and quad single quotes, with no luck. 回答1: You can escape it