Results 1 to 3 of 3

Thread: shortening a float

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183

    shortening a float

    I have a float value (say 3.1223343) and I want to round it so that it displays as say 3.12.... any ideas?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    VB Code:
    1. float x=3.1223343F;
    2.    MessageBox.Show(this,x.ToString("#.##"));

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183
    perfect that makes sense, thanx!

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