I have the following code and want my total to include a comma as a thousand separater. how do i go about it
[code=c]
else if (itemType == 1) // debit
{
total += Convert.ToDecim al(rec.getAmoun t());
//total=Convert.T oDecimal(total) ;
outFile.Write(" {0} {1}", rec.getAmount() .PadRight(13, ' '), total.ToString( ).PadLeft(13, ' '));
}
else
{
total +=Convert.ToDec imal(rec.getAmo unt());
outFile.Write(" {0} {1}", rec.getAmount() .PadRight(13, ' '), total.ToString( ).PadLeft(13, ' '));
}
if (putTemplate) outFile.Write(" |"); else outFile.Write(" ");
putEndOfLine();
recnDetailNeede d = disp.needRecn() ;
[/code]
[code=c]
else if (itemType == 1) // debit
{
total += Convert.ToDecim al(rec.getAmoun t());
//total=Convert.T oDecimal(total) ;
outFile.Write(" {0} {1}", rec.getAmount() .PadRight(13, ' '), total.ToString( ).PadLeft(13, ' '));
}
else
{
total +=Convert.ToDec imal(rec.getAmo unt());
outFile.Write(" {0} {1}", rec.getAmount() .PadRight(13, ' '), total.ToString( ).PadLeft(13, ' '));
}
if (putTemplate) outFile.Write(" |"); else outFile.Write(" ");
putEndOfLine();
recnDetailNeede d = disp.needRecn() ;
[/code]
Comment