Mega Code Archive

 
Categories / C# Tutorial / Data Type
 

To format numeric data

WriteLine("format string", arg0, arg1, ... , argN); Format specifiers take this general form: {argnum, width: fmt} argnum specifies the number of the argument (starting from zero) to display. width specifies the minimum width of the field fmt specifies the format Both width and fmt are optional. {0} indicates arg0, {1} specifies arg1, and so on.