Results 1 to 2 of 2

Thread: Format Number - 2 decimals

  1. #1

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166

    Format Number - 2 decimals

    How would I format a number to two decimals. For example 1.1 would be displayed to 1.10. Thanks.

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    One way
    Code:
    			float f = 1.1f;
    			MessageBox.Show(f.ToString("0.00"));

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