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

C#

 
GeneralRe: State map with markers,info windows Pin
shultas28-Aug-09 8:03
shultas28-Aug-09 8:03 
GeneralRe: State map with markers,info windows Pin
stancrm28-Aug-09 13:13
stancrm28-Aug-09 13:13 
QuestionModulo Function Pin
Quake2Player28-Aug-09 5:21
Quake2Player28-Aug-09 5:21 
AnswerRe: Modulo Function Pin
DaveyM6928-Aug-09 5:23
professionalDaveyM6928-Aug-09 5:23 
AnswerRe: Modulo Function Pin
harold aptroot28-Aug-09 5:36
harold aptroot28-Aug-09 5:36 
AnswerRe: Modulo Function Pin
Dave Kreskowiak28-Aug-09 7:15
mveDave Kreskowiak28-Aug-09 7:15 
GeneralRe: Modulo Function Pin
Quake2Player28-Aug-09 7:22
Quake2Player28-Aug-09 7:22 
GeneralRe: Modulo Function Pin
Luc Pattyn28-Aug-09 7:38
sitebuilderLuc Pattyn28-Aug-09 7:38 
Quake2Player wrote:
8 568 * 4 974 445)


using 32-bit signed arithmetic (as in int) this results in an overflow, that is where the negative stuff is coming from. Nothing wrong with the modulo operator.

test: declare long variables, initialize them, and use those for your expression, instead of numeric constants. (decimal should work too).

Smile | :)

Luc Pattyn
Badger | [badger,badger,badger,badger...] Jig | [Dance] Badger | [badger,badger,badger,badger...] Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.Jig | [Dance] Badger | [badger,badger,badger,badger...] Jig | [Dance]

GeneralRe: Modulo Function Pin
DaveyM6928-Aug-09 7:38
professionalDaveyM6928-Aug-09 7:38 
GeneralRe: Modulo Function Pin
Quake2Player28-Aug-09 14:46
Quake2Player28-Aug-09 14:46 
GeneralRe: Modulo Function Pin
DaveyM6928-Aug-09 7:38
professionalDaveyM6928-Aug-09 7:38 
GeneralRe: Modulo Function [modified] Pin
Quake2Player29-Aug-09 11:55
Quake2Player29-Aug-09 11:55 
QuestionUsing Text Files Pin
gamer112728-Aug-09 4:54
gamer112728-Aug-09 4:54 
AnswerRe: Using Text Files Pin
Coding C#28-Aug-09 4:55
Coding C#28-Aug-09 4:55 
GeneralRe: Using Text Files Pin
gamer112728-Aug-09 5:13
gamer112728-Aug-09 5:13 
AnswerRe: Using Text Files Pin
OriginalGriff28-Aug-09 5:07
mveOriginalGriff28-Aug-09 5:07 
GeneralRe: Using Text Files Pin
gamer112728-Aug-09 5:19
gamer112728-Aug-09 5:19 
GeneralRe: Using Text Files Pin
OriginalGriff28-Aug-09 5:34
mveOriginalGriff28-Aug-09 5:34 
GeneralRe: Using Text Files Pin
Luc Pattyn28-Aug-09 7:40
sitebuilderLuc Pattyn28-Aug-09 7:40 
GeneralRe: Using Text Files Pin
OriginalGriff28-Aug-09 8:19
mveOriginalGriff28-Aug-09 8:19 
QuestionChange richtextbox colors - C# Pin
OrkanA28-Aug-09 4:39
OrkanA28-Aug-09 4:39 
AnswerRe: Change richtextbox colors - C# Pin
OrkanA29-Aug-09 4:57
OrkanA29-Aug-09 4:57 
QuestionDataBinding removal error Pin
kanchoette28-Aug-09 4:29
kanchoette28-Aug-09 4:29 
AnswerRe: DataBinding removal error Pin
Keith Barrow28-Aug-09 4:34
professionalKeith Barrow28-Aug-09 4:34 
GeneralRe: DataBinding removal error Pin
kanchoette30-Aug-09 4:21
kanchoette30-Aug-09 4:21 

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.