I m curious why would i use string formatting while i can use concatenation such as
Console.WriteLine(\"Hello {0} !\", name);
Console.WriteLine(\"Hello \"+
You are using a trivial example where there is not much of a difference. However, if you have a long string with many parameters it is much nicer to be able to use a format string instead of many, many + signs and line breaks.
It also allows you to format numerical data as you wish, i.e., currency, dates, etc.