取到小數第2位
ref: SO
- String.Format("{0:0.00}", 123.4567); // "123.46"
- String.Format("{0:0.00}", 123.4); // "123.40"
- String.Format("{0:0.00}", 123.0); // "123.00"
- String.Format("{0:0.##}", 123.4567); // "123.46"
- String.Format("{0:0.##}", 123.4); // "123.4"
- String.Format("{0:0.##}", 123.0); // "123"
- Eval("ColName", "{0:0.##}%") // DataView Bind with %
沒有留言:
張貼留言