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
Solved

declare a decimal integer with only 2 digits after the .

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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