Solved

declare a decimal integer with only 2 digits after the .

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

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 to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now