Hi,
I am getting error in formatting string. please help me.
dataTableRow["Amount"] = string.Format("###,###,###.0-", Value[1].ToString());
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shweta LodhaPosted Jun 19, 2014, 1:43 PM
You missed a small thing:
dataTableRow["Amount"] = string.Format("{0:###,###,###.0-}", Value[1].ToString());
Shantoh SinghPosted Jun 20, 2014, 9:26 AM
Abhay ShankerPosted Jun 19, 2014, 11:07 PM
dataTableRow["Amount"] =String.Format("{0:###,###,###.0-}", Value[1].ToString());
you can also try as below
string.Format("{0:#,###0}", 123456789); // 123,456,789
string.Format("{0:#,###0}", 0); // 0