Solved

declare a decimal integer with only 2 digits after the .

Posted on 2007-03-27
4
548 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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