Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
when trying to convert: 0.00007965, to string using cstr, str or tostring,
they return 7.965E-05.
 
I want: 0.00007965, there's any way to do it?, or I have to write a function
to do it.
Posted 23-Feb-13 5:28am
faneleo196
Comments
Sergey Alexandrovich Kryukov at 3-Mar-13 18:46pm
   
Please don't post non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use the appropriate format control types to print the value in fixed rather than scientific notation as described in MSDN[^].
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,
 
Try this:
Console.WriteLine(CDec(0.00007965).ToString)
' output: 0.00007965
Hope this helps.
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 371
1 Sergey Alexandrovich Kryukov 286
2 RyanDev 75
3 PhilLenoir 70
4 Pheonyx 50
0 Sergey Alexandrovich Kryukov 6,676
1 OriginalGriff 6,056
2 CPallini 2,473
3 Richard MacCutchan 1,697
4 Abhinav S 1,560


Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100