Wednesday, 18 September 2013

escaping curly braces for string.format

escaping curly braces for string.format

void f(string message)
{
string.Format(message,"x",y");
}
f() is called by g:
g()
{
f(SomeJson+"{0}");
}
the curly braces in json are being interpreted as placeholders for values
by string.format() in f(). IS there a way to have the curly braces
escaped?

No comments:

Post a Comment