Escape brackets in a formatted string
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 | class Program { static void Main(string[] args) { string num = "10,25,30,50"; string output = String.Format("text{{{0}}}", num); Console.WriteLine(output); Console.ReadLine(); } } |
Output:
1 2 3 | text{10,25,30,50} |