I m curious why would i use string formatting while i can use concatenation such as
Console.WriteLine(\"Hello {0} !\", name);
Console.WriteLine(\"Hello \"+
The first format is recommended. It allows you to specify specific formats for other types, like displaying a hex value, or displaying some specific string format.
e.g.
string displayInHex = String.Format("{0,10:X}", value); // to display in hex
It is also more consistent. You can use the same convention to display your Debug statement. e.g.
Debug.WriteLine (String.Format("{0,10:X}", value));
Last but not least, it helps in the localisation of your program.