Search code examples
c#.netsilverlight

how to insert "{0}" as a string in c#


One of the strings I want to pass into a function contains {0}, which is a placeholder escape character in c#.

What is the correct syntax to get c# to ignore this? i tried encasing it in single quotes ('), but no good


Solution

  • You need to escape the curly braces like this:

    {{0}}