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
You could just use the HTML entity, if it's for HTML.
-- Edit
'
-- Edit
Just to make this post not wrong, as everyone else has noted, escaping works fine :)
string s = t.ToString("MMM d \\'yy 'at' H:mmm");
And that's the last time I don't test something based on who is posting :)
I don't like the C# @ strings unless I really have to use them so I would actually go with this.
return dt.ToString("MMM d \\'yy 'at' H:mmm");
It's just a preference though for which you find easier to "read".
You can escape it using a backslash which you will have to escape. Either
return dt.ToString(@"MMM d \'yy 'at' H:mmm");
or
return dt.ToString("MMM d \\'yy 'at' H:mmm");