I am formatting a date:
str = String.Format(\"{0:MMM d m:mm\"+yearStr+\"}\", dt);
I want to put the word \"at\" after the \"d\", but I don\
string.Format(@"{0:MMM d \a\t m:mm" + yearStr + "}", dt);
Note the double escaping - I used a varbatim string so I was able to write \
inside the string as a normal character. The formatting routine for DateTime
then interprets this (again) as an escape sequence.
Here is a simpler variant:
string.Format("{0:MMM d} at {0:m:mm" + yearStr + "}", dt);
The first variant might be considered disgusting by some. The latter one is very clear to read, though.