Relative Content

Tag Archive for c#escaping

How to escape arbitrary special characters

Suppose we have a string variable that we know may contain special characters such as n and r. We want to write this string to the console, but we want to see “r” and “n” instead of line breaks.