Click here to Skip to main content
15,867,704 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered Pin
riced27-Jul-10 11:06
riced27-Jul-10 11:06 
GeneralRe: C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered Pin
ayandelhi27-Jul-10 18:05
ayandelhi27-Jul-10 18:05 
AnswerRe: C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered Pin
Chris Trelawny-Ross27-Jul-10 12:55
Chris Trelawny-Ross27-Jul-10 12:55 
GeneralRe: C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered Pin
Kim Togo28-Jul-10 1:35
professionalKim Togo28-Jul-10 1:35 
AnswerRe: C# program to block user input(both mouse and keyboard) until a specific keyword(password) is entered Pin
aj.esler28-Jul-10 1:28
aj.esler28-Jul-10 1:28 
QuestionHow come I get a rounded number when I multiply doubles?? [modified] Pin
roman_s27-Jul-10 5:52
roman_s27-Jul-10 5:52 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
harold aptroot27-Jul-10 6:03
harold aptroot27-Jul-10 6:03 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Luc Pattyn27-Jul-10 6:06
sitebuilderLuc Pattyn27-Jul-10 6:06 
Your subject line claims you're multiplying doubles, I guess you are not. Assuming InvItem.Price is an integer, InvItem.Price / 100 is too.

if you hadn't used parentheses around it, the result would have been correct.

The better approach however is to use either floating-point or decimal for all quantities that aren't integer by their very nature, here Price.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Tuesday, July 27, 2010 12:18 PM

AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Richard MacCutchan27-Jul-10 6:10
mveRichard MacCutchan27-Jul-10 6:10 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
T M Gray27-Jul-10 9:01
T M Gray27-Jul-10 9:01 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
William Winner27-Jul-10 9:24
William Winner27-Jul-10 9:24 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
T M Gray27-Jul-10 10:12
T M Gray27-Jul-10 10:12 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Theraot28-Jul-10 4:15
Theraot28-Jul-10 4:15 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
pinskerr28-Jul-10 1:10
pinskerr28-Jul-10 1:10 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
roman_s28-Jul-10 3:43
roman_s28-Jul-10 3:43 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
ely_bob28-Jul-10 3:43
professionalely_bob28-Jul-10 3:43 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
Charvak Karpe28-Jul-10 4:12
Charvak Karpe28-Jul-10 4:12 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
ely_bob28-Jul-10 4:32
professionalely_bob28-Jul-10 4:32 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
Member 315345731-Jul-10 18:13
Member 315345731-Jul-10 18:13 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Kenneth Kasajian28-Jul-10 8:29
Kenneth Kasajian28-Jul-10 8:29 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
PaulLinton28-Jul-10 14:15
PaulLinton28-Jul-10 14:15 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
Kenneth Kasajian28-Jul-10 14:42
Kenneth Kasajian28-Jul-10 14:42 
GeneralRe: How come I get a rounded number when I multiply doubles?? Pin
Mitch Hughes29-Jul-10 11:04
professionalMitch Hughes29-Jul-10 11:04 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
sushantpokharel28-Jul-10 20:46
sushantpokharel28-Jul-10 20:46 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Member 315345731-Jul-10 18:08
Member 315345731-Jul-10 18:08 

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.