Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
GeneralRe: Property vs Variable? Pin
That Asian Guy19-Nov-08 14:14
That Asian Guy19-Nov-08 14:14 
AnswerRe: Property vs Variable? Pin
Mark Churchill19-Nov-08 14:45
Mark Churchill19-Nov-08 14:45 
QuestionCustom Control Selectable Text Pin
AlcedoSoftware19-Nov-08 13:20
AlcedoSoftware19-Nov-08 13:20 
QuestionI need how with a slide show project and a ball bouncing project Pin
Robert Anders19-Nov-08 12:34
Robert Anders19-Nov-08 12:34 
AnswerRe: I need how with a slide show project and a ball bouncing project Pin
Colin Angus Mackay19-Nov-08 12:48
Colin Angus Mackay19-Nov-08 12:48 
AnswerRe: I need how with a slide show project and a ball bouncing project Pin
DaveyM6919-Nov-08 13:14
professionalDaveyM6919-Nov-08 13:14 
QuestionMSDN Method Implemented? Pin
Gywox19-Nov-08 12:04
Gywox19-Nov-08 12:04 
QuestionSimple loop problems ?? Pin
nlowdon19-Nov-08 11:11
nlowdon19-Nov-08 11:11 
Hi folks !!
I'm new here and am trying to teach myself (and loving it) c# !!

Can anyone please give me an insght as to why the two loops i've listed only ever seem to execute once ?
I've put message boxes in to see how many times it's going round and it always seems to show 0 ?
I'm confused !!

Many thanks (i think you'll all be seeing a LOT more of me !

Neil

//first loop
int tempnum = 0;
while (tempnum < 10) 
{ 
newLoc.X = oldLocation.X + 5; 
newLoc.Y = oldLocation.Y; 

if (newLoc.X >= (250)) 
{ 
newLoc = oldLocation; 
}// close inner if statement 
cat.Location = newLoc; 
tempnum = tempnum + 1; 
MessageBox.Show(tempnum.ToString()); 
} 


//second loop
for (int i = 0; i < 20; i++) 
{ 
newLoc.Y = oldLocation.Y - 5; 
newLoc.X = oldLocation.X; 

if (newLoc.Y <= (2)) 
{ 
newLoc = oldLocation; 
}// close inner if statement 
cat.Location = newLoc; 
MessageBox.Show("" + i); 
}

AnswerRe: Simple loop problems ?? Pin
Wendelius19-Nov-08 11:38
mentorWendelius19-Nov-08 11:38 
GeneralRe: Simple loop problems ?? Pin
Samer Aburabie19-Nov-08 11:50
Samer Aburabie19-Nov-08 11:50 
AnswerRe: Simple loop problems ?? Pin
Christian Graus19-Nov-08 11:47
protectorChristian Graus19-Nov-08 11:47 
GeneralRe: Simple loop problems ?? Pin
nlowdon19-Nov-08 12:12
nlowdon19-Nov-08 12:12 
GeneralRe: Simple loop problems ?? Pin
Colin Angus Mackay19-Nov-08 12:26
Colin Angus Mackay19-Nov-08 12:26 
GeneralRe: Simple loop problems ?? Pin
nlowdon19-Nov-08 13:22
nlowdon19-Nov-08 13:22 
AnswerRe: Simple loop problems ?? Pin
mutafa8119-Nov-08 13:55
mutafa8119-Nov-08 13:55 
AnswerRe: Simple loop problems ?? Pin
That Asian Guy19-Nov-08 14:30
That Asian Guy19-Nov-08 14:30 
AnswerRe: Simple loop problems ?? Pin
JamesChen719-Nov-08 15:18
JamesChen719-Nov-08 15:18 
QuestionData Importing one column Pin
postonoh19-Nov-08 10:29
postonoh19-Nov-08 10:29 
AnswerRe: Data Importing one column Pin
Wendelius19-Nov-08 11:09
mentorWendelius19-Nov-08 11:09 
QuestionNeed help making a webbrowser... Pin
lekira19-Nov-08 10:14
lekira19-Nov-08 10:14 
AnswerRe: Need help making a webbrowser... Pin
Pedram Behroozi19-Nov-08 10:20
Pedram Behroozi19-Nov-08 10:20 
GeneralRe: Need help making a webbrowser... Pin
lekira19-Nov-08 10:31
lekira19-Nov-08 10:31 
GeneralRe: Need help making a webbrowser... Pin
Pedram Behroozi19-Nov-08 20:03
Pedram Behroozi19-Nov-08 20:03 
GeneralRe: Need help making a webbrowser... [modified] Pin
lekira20-Nov-08 15:02
lekira20-Nov-08 15:02 
QuestionAccessing a parent class' methods Pin
Anthony Mushrow19-Nov-08 10:12
professionalAnthony Mushrow19-Nov-08 10:12 

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.