c# - How do I prevent Long / Int64 ToString() converting to Exponential Format? -
running .net 4.6 , x64 build options.
no tostring() format option seems work numbers on 15 digits in length, converts them exponential format.
what have tried far:
long.tostring("#"); long.tostring("g"); long.tostring("0"); long.tostring("#,#"); long.tostring("0,0");
the thing partially works is:
long.tostring("0,0"); //ex.) 5,149,673,432,170,230
however, prefer plain number. prefer not use:
string.replace(",", "");
any suggestions?
edit: solution 1 tried. .tostring("0")
ran full repair of vs2015 , cleaned solution. it's working intended.
you can use "0" format.
long num = 1234567890123456789; system.diagnostics.debug.writeline("str=" + num.tostring("0"));
output: str=1234567890123456789
Comments
Post a Comment