Click here to Skip to main content
15,917,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to show only 2 decimal points when using a double Pin
Luc Pattyn15-Sep-09 4:37
sitebuilderLuc Pattyn15-Sep-09 4:37 
AnswerRe: How to show only 2 decimal points when using a double Pin
Etienne_12315-Sep-09 4:40
Etienne_12315-Sep-09 4:40 
GeneralRe: How to show only 2 decimal points when using a double Pin
musefan15-Sep-09 4:55
musefan15-Sep-09 4:55 
AnswerRe: How to show only 2 decimal points when using a double Pin
0x3c015-Sep-09 5:32
0x3c015-Sep-09 5:32 
GeneralRe: How to show only 2 decimal points when using a double Pin
J4amieC15-Sep-09 5:46
J4amieC15-Sep-09 5:46 
GeneralRe: How to show only 2 decimal points when using a double Pin
0x3c015-Sep-09 5:51
0x3c015-Sep-09 5:51 
AnswerRe: How to show only 2 decimal points when using a double Pin
OriginalGriff15-Sep-09 6:24
mveOriginalGriff15-Sep-09 6:24 
GeneralRe: How to show only 2 decimal points when using a double Pin
0x3c015-Sep-09 6:55
0x3c015-Sep-09 6:55 
Wow, that's clever. I hadn't thought of doing that - it'll be filed away for future use. That's actually a lot better than mine as well, because it doesn't use strings.

For the OP, what this function does is move the decimal place right by the number of places you want to get. Then it strips off the rest of the decimal places on that number, and moves the decimal place back again, so that everything stays the same. The sequence of events, assuming you want to convert 1.23456789 to 1.234 is this:

1.23456789 -> 1234.56789
Truncate -> 1234
Divide again -> 1.234


GeneralRe: How to show only 2 decimal points when using a double Pin
OriginalGriff15-Sep-09 8:31
mveOriginalGriff15-Sep-09 8:31 
Questionhow to access and run method from main form without creating a new object instance of the form? Pin
stan_lee2615-Sep-09 3:34
stan_lee2615-Sep-09 3:34 
AnswerRe: how to access and run method from main form without creating a new object instance of the form? Pin
Keith Barrow15-Sep-09 4:18
professionalKeith Barrow15-Sep-09 4:18 
QuestionWindows 7 - Install Windows Service Pin
dataminers15-Sep-09 2:23
dataminers15-Sep-09 2:23 
AnswerRe: Windows 7 - Install Windows Service Pin
Mirko198015-Sep-09 2:27
Mirko198015-Sep-09 2:27 
GeneralRe: Windows 7 - Install Windows Service Pin
dataminers15-Sep-09 4:03
dataminers15-Sep-09 4:03 
QuestionExcel application object in automation add-in? Pin
SRKSHOME15-Sep-09 2:01
SRKSHOME15-Sep-09 2:01 
QuestionHow to improve preformance of drawing in c# Pin
Member 33751415-Sep-09 1:33
Member 33751415-Sep-09 1:33 
AnswerRe: How to improve preformance of drawing in c# Pin
Nuri Ismail15-Sep-09 1:47
Nuri Ismail15-Sep-09 1:47 
GeneralRe: How to improve preformance of drawing in c# Pin
Luc Pattyn15-Sep-09 4:39
sitebuilderLuc Pattyn15-Sep-09 4:39 
GeneralRe: How to improve preformance of drawing in c# Pin
Nuri Ismail15-Sep-09 4:59
Nuri Ismail15-Sep-09 4:59 
AnswerRe: How to improve preformance of drawing in c# Pin
musefan15-Sep-09 2:09
musefan15-Sep-09 2:09 
AnswerRe: How to improve preformance of drawing in c# Pin
Eddy Vluggen15-Sep-09 2:39
professionalEddy Vluggen15-Sep-09 2:39 
Questionredirect to PHP page from C# code Pin
Alaa Telfah15-Sep-09 1:32
Alaa Telfah15-Sep-09 1:32 
AnswerRe: redirect to PHP page from C# code Pin
SeMartens15-Sep-09 1:37
SeMartens15-Sep-09 1:37 
QuestionConvert The Layout Of The Application Between Arabic And English Pin
Thaer Hamael15-Sep-09 1:20
Thaer Hamael15-Sep-09 1:20 
AnswerRe: Convert The Layout Of The Application Between Arabic And English Pin
Keith Barrow15-Sep-09 1:34
professionalKeith Barrow15-Sep-09 1:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.