Solved

declare a decimal integer with only 2 digits after the .

Posted on 2007-03-27
4
546 Views
Last Modified: 2008-02-01
Hi Im looking to declare a decimal integer with only 2 digits after the .
0
Comment
Question by:mairtinobrian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 18799226
Hello mairtinobrian,

What do you mean by declare? declare a variable or just use the 2 digit rule when visualize it?

Regards,
mmarinov
0
 

Author Comment

by:mairtinobrian
ID: 18799319
Hi Im converting  a bunch of currencies so for example converting $1 to some currency with an exchange rate of .0000234  $1 / .000234 = 4273.504274  I want to display this value to 2 places of decimal  4273.50
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 18799591
you can use the ToString method: (1 / .000234).Tostring("#,##0.00")
0
 

Author Comment

by:mairtinobrian
ID: 18799857
Excellent thanks emoreau:
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS question 16 63
asp.net repeater server posting 5 39
Display Day name if condition is true in crystal report (VB.Net) 2 36
vb.net searchandselect 12 20
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question