2

I have a custom string formatter, that I want to use after using the Standard formatter, my custom string formatter uses the {0:SP} as its format prefix.

What I am trying to do is get this simple example to work

  String.Format("{{0}:SP}" , 1)

I am getting an exception:

base: {System.FormatException: Input string was not in a correct format.

What it the correct way to do this?

1 Answer 1

4
String.Format("{{{0}:SP}}" , 1)

it is annoying but you have to put 2 of them inside if you want to display {1:SP}

Here is the original answer

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.