Kasun's Blog
Wednesday, July 13, 2011
C# Format string with a number to two decimal places
formattedValueFrom = String.Format("{0:0.00}", decimal.Parse(row["ValueFrom"].ToString().Trim()))
row - A DataRow in a DataTable
ValueFrom - A column in the DataRow
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment