The ToString method is overloaded and accepts parameters to specify the
format. For example ToString("#.0")
See the docs.
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
"Jianwei Sun" <js***********@gmail.com> escribió en el mensaje
news:uw**************@TK2MSFTNGP14.phx.gbl...
Hi, guys,
If I simply do a double d = 2.0 ,and then s=d.ToString() , it will trim
the .0 off and return me 2, is there a good way to keep .0 and return me
2.0.
Thanks,