Results 1 to 4 of 4

Thread: Why does VB.Net round the calculated results to whole number?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    210

    Why does VB.Net round the calculated results to whole number?

    The result should be something like 0.001 but it rounds the number to 1.
    I tried dimming the variable as long, double, int64, but didn't work.

    Any way to do this?

    Thanks in advance.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    210

    um.. lol

    double works.. heh.
    sorry.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    decimal should work as well.

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The reason being that Int64, Long,Short, and Integer are all whole number variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width