Hi all,
I am going through the concepts of CSharp and I could not understand.. and get enough info on net about String.Format().
Can someone please explain how is it useful?!
I got this example.. but i see no use of using String.Format() here as.. use it or not.. the result would be same.. then why did the author use it here.
using System;
public class Exercise
{
static int Main(string[] args)
{
var wage = 22.45;
var strDisplay = string.Format("Hourly Salary: {0}", wage);
Console.WriteLine(strDisplay);
return 0;
}
}
Output:
Hourly Salary: 22.45
Also, any info about this String.Format() will be helpful.
Thankyou.