+ 1
A formatted string is a string in desired format. you can use String.Format() method for formating a string. you can also use the overloaded Console.WriteLine() method, .ToString() also for formating. let me add few examples of each String.Format("name : {0}, age :{1}", "sujith",28): Console.WriteLine("name : {0}, age :{1}", "sujith",28): // both will give : sujith,age : 28 let curDate will be a DateTime object holds the current Date with time and you want to display the date like 2018-01-23 then the . ToString () can be used like this: string curDateStr = curDate.ToString("yyyy-MM-dd");
23rd Jan 2018, 5:26 PM
Sujith k sukumar
Sujith k sukumar - avatar