Click here to Skip to main content
16,005,389 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid accepts keypress event Pin
Daniel Turini1-Dec-04 20:19
Daniel Turini1-Dec-04 20:19 
GeneralRe: DataGrid accepts keypress event Pin
Rebecca Gao1-Dec-04 23:59
Rebecca Gao1-Dec-04 23:59 
Generalsuspending layout, useragents, and creating shortcuts... Pin
dkarlton1-Dec-04 15:31
dkarlton1-Dec-04 15:31 
QuestionHow to install ISAM Pin
Anonymous1-Dec-04 15:00
Anonymous1-Dec-04 15:00 
AnswerRe: How to install ISAM Pin
Dave Kreskowiak2-Dec-04 1:34
mveDave Kreskowiak2-Dec-04 1:34 
GeneralRounding off decimals Pin
Anonymous1-Dec-04 11:45
Anonymous1-Dec-04 11:45 
GeneralRe: Rounding off decimals Pin
Christian Graus1-Dec-04 12:37
protectorChristian Graus1-Dec-04 12:37 
GeneralRe: Rounding off decimals Pin
User 103263711-Dec-04 12:55
User 103263711-Dec-04 12:55 
That's correct.

But Math.Round uses the bankers algorithm for rounding. So 3.45 returns 3.4 instead of 3.5.

Be wary of that. If you need to have normal rounding (I mean the one we learn in school) then you'll need to implement your own custom rounding procedure. Which is fairly easy.

Furthermore it's wise that you choose for the Decimal type instead of Single or Double type because these types are approximations and would give rounding errors quite quickly.

Kind regards

Marcel van den Hof

Generalshadows please help Pin
aquahawk1-Dec-04 10:53
aquahawk1-Dec-04 10:53 
GeneralHtml Editor and Mail Program Pin
Dirso1-Dec-04 10:15
Dirso1-Dec-04 10:15 
GeneralRe: Html Editor and Mail Program Pin
cobyjone1-Dec-04 14:01
cobyjone1-Dec-04 14:01 
GeneralRe: Html Editor and Mail Program Pin
Dirso6-Dec-04 23:35
Dirso6-Dec-04 23:35 
Generalcaret position in a being edited Node Pin
TyronX1-Dec-04 10:03
TyronX1-Dec-04 10:03 
GeneralRe: caret position in a being edited Node Pin
Dave Kreskowiak1-Dec-04 10:55
mveDave Kreskowiak1-Dec-04 10:55 
GeneralRe: caret position in a being edited Node Pin
TyronX1-Dec-04 11:03
TyronX1-Dec-04 11:03 
GeneralRe: caret position in a being edited Node Pin
TyronX2-Dec-04 7:54
TyronX2-Dec-04 7:54 
GeneralWindowsPrincipal in non-AD environment Pin
Mike Hodnick1-Dec-04 8:21
Mike Hodnick1-Dec-04 8:21 
Questionhow to rewrite xml file Pin
IvyLee1-Dec-04 8:15
IvyLee1-Dec-04 8:15 
AnswerRe: how to rewrite xml file Pin
Christian Graus1-Dec-04 9:49
protectorChristian Graus1-Dec-04 9:49 
GeneralDynamically naming tabs Pin
thepersonof1-Dec-04 7:49
thepersonof1-Dec-04 7:49 
GeneralRe: Dynamically naming tabs Pin
RB@Emphasys1-Dec-04 9:23
RB@Emphasys1-Dec-04 9:23 
Generalcreating a list view like windows explorer view Pin
iffi9921-Dec-04 7:15
iffi9921-Dec-04 7:15 
GeneralRegex / String formatting question Pin
julian_l1-Dec-04 7:05
julian_l1-Dec-04 7:05 
GeneralRe: Regex / String formatting question Pin
Anonymous1-Dec-04 10:10
Anonymous1-Dec-04 10:10 
GeneralRe: Regex / String formatting question Pin
julian_l2-Dec-04 6:17
julian_l2-Dec-04 6:17 

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.