The following bit of C# code does not seem to do anything:
String str = \"{3}\";
str.Replace(\"{\", String.Empty);
str.Replace(\"}\", String.Empty);
Console
String is immutable; you can't change an instance of a string. Your two Replace() calls do nothing to the original string; they return a modified string. You want this instead:
String str = "{3}";
str = str.Replace("{", String.Empty);
str = str.Replace("}", String.Empty);
Console.WriteLine(str);
It works this way in Java as well.