Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: statusstrip <---data Pin
Ed.Poore25-Jul-08 22:49
Ed.Poore25-Jul-08 22:49 
Questionform layout: rate this practice Pin
nelsonpaixao25-Jul-08 14:18
nelsonpaixao25-Jul-08 14:18 
AnswerRe: form layout: rate this practice Pin
PIEBALDconsult25-Jul-08 19:44
mvePIEBALDconsult25-Jul-08 19:44 
Questiondecoding gzip http response Pin
udikantz25-Jul-08 11:50
udikantz25-Jul-08 11:50 
QuestionWindows Services - Log On As User Account Pin
dataminers25-Jul-08 11:29
dataminers25-Jul-08 11:29 
AnswerRe: Windows Services - Log On As User Account Pin
Mark Salsbery25-Jul-08 13:59
Mark Salsbery25-Jul-08 13:59 
QuestionHow to check if a number can be dived by 8 Pin
Gareth H25-Jul-08 11:00
Gareth H25-Jul-08 11:00 
AnswerRe: How to check if a number can be dived by 8 [modified] Pin
Wendelius25-Jul-08 11:06
mentorWendelius25-Jul-08 11:06 
Hi,

Use modulus operator (%) and check that the remainder is 0

For example: 7%7 and 14%7 returns 0 while 8%7 and 15%7 returns 1 and so on.
for (int i = 0; i < 64; i++) {
   //doStuff
   if (i % 7 == 0) {
      //change int
   }
}

[addition]
Of course if you don't actually need the values between you can modify your loop incrementation:
for (int i = -1; i < 64; i=i+8){
   //doStuff
   if (i == 7 || i == 15 || i == 23 || i == 31 || i == 39 || i == 47 || i == 55)    {
      //change int
   }
}

[addition ends]


Hope this helps,

Mika

modified on Friday, July 25, 2008 5:33 PM

GeneralRe: How to check if a number can be dived by 8 Pin
Gareth H25-Jul-08 11:46
Gareth H25-Jul-08 11:46 
GeneralRe: How to check if a number can be dived by 8 Pin
Luc Pattyn25-Jul-08 12:02
sitebuilderLuc Pattyn25-Jul-08 12:02 
AnswerRe: How to check if a number can be dived by 8 Pin
Lutosław25-Jul-08 11:30
Lutosław25-Jul-08 11:30 
AnswerRe: How to check if a number can be dived by 8 Pin
#realJSOP26-Jul-08 0:52
mve#realJSOP26-Jul-08 0:52 
NewsNetAsm, A JIT Native Code Injection Library Pin
AlexandreMutel25-Jul-08 10:58
AlexandreMutel25-Jul-08 10:58 
GeneralRe: NetAsm, A JIT Native Code Injection Library Pin
DaveyM6925-Jul-08 11:23
professionalDaveyM6925-Jul-08 11:23 
GeneralRe: NetAsm, A JIT Native Code Injection Library Pin
Roger Alsing25-Jul-08 23:50
Roger Alsing25-Jul-08 23:50 
QuestionHL7 integration with C# Pin
Aslesh25-Jul-08 8:32
Aslesh25-Jul-08 8:32 
AnswerRe: HL7 integration with C# Pin
DaveyM6925-Jul-08 9:12
professionalDaveyM6925-Jul-08 9:12 
AnswerRe: HL7 integration with C# Pin
Bob Nadler25-Jul-08 12:25
Bob Nadler25-Jul-08 12:25 
AnswerRe: HL7 integration with C# Pin
#realJSOP26-Jul-08 0:47
mve#realJSOP26-Jul-08 0:47 
GeneralHL7 integration with C# PinPopular
Bob Nadler30-Jul-08 17:44
Bob Nadler30-Jul-08 17:44 
QuestionCharArrayReader Pin
DwR25-Jul-08 8:25
DwR25-Jul-08 8:25 
AnswerRe: CharArrayReader Pin
SomeGuyThatIsMe25-Jul-08 8:26
SomeGuyThatIsMe25-Jul-08 8:26 
AnswerRe: CharArrayReader Pin
DaveyM6925-Jul-08 9:04
professionalDaveyM6925-Jul-08 9:04 
QuestionHttpRequest and Submit button in html Pin
f4hd25-Jul-08 8:24
f4hd25-Jul-08 8:24 
AnswerRe: HttpRequest and Submit button in html Pin
f4hd31-Jul-08 5:40
f4hd31-Jul-08 5:40 

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.