Click here to Skip to main content
15,891,375 members
Home / Discussions / C#
   

C#

 
AnswerRe: Process.Start() parameter with space char problem Pin
Eddy Vluggen17-Mar-09 1:07
professionalEddy Vluggen17-Mar-09 1:07 
GeneralRe: Process.Start() parameter with space char problem Pin
half-life17-Mar-09 1:39
half-life17-Mar-09 1:39 
Questionhow to get out from the outer for Pin
erdem0117-Mar-09 0:16
erdem0117-Mar-09 0:16 
AnswerRe: how to get out from the outer for Pin
Xmen Real 17-Mar-09 0:25
professional Xmen Real 17-Mar-09 0:25 
AnswerRe: how to get out from the outer for Pin
Eddy Vluggen17-Mar-09 0:27
professionalEddy Vluggen17-Mar-09 0:27 
AnswerRe: how to get out from the outer for Pin
Simon P Stevens17-Mar-09 0:29
Simon P Stevens17-Mar-09 0:29 
AnswerRe: how to get out from the outer for Pin
Eslam Afifi17-Mar-09 0:40
Eslam Afifi17-Mar-09 0:40 
AnswerRe: how to get out from the outer for PinPopular
Pete O'Hanlon17-Mar-09 0:53
mvePete O'Hanlon17-Mar-09 0:53 
Your question shows that you have a misunderstanding of what a for loop actually does. I cringe whenever I see people use break statements inside for loops because it shows they've just gone for convenience without actually considering what they are trying to do.

A for loop is used to iterate a predictable and set number of times; that's what it's for (pardon the pun). If you need to iterate an indeterminate number of times, then you should consider using a boolean based loop structure, i.e. while ... do or do ... while instead (and yes - I know that a for loop is boolean based in that the exit condition is satisfied when you reach the to value in the count). Then, your logic makes more sense because you've based your exit on the condition you're testing.

Please, consider redoing your looping mechanism to a one that's a better fit. Whenever I see people recommending break or goto statements, I know that they are being lazy or have given no thought to what the proper use of the loop should be.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys



GeneralRe: how to get out from the outer for Pin
Colin Angus Mackay17-Mar-09 0:58
Colin Angus Mackay17-Mar-09 0:58 
GeneralRe: how to get out from the outer for Pin
Simon P Stevens17-Mar-09 1:30
Simon P Stevens17-Mar-09 1:30 
GeneralRe: how to get out from the outer for Pin
Xmen Real 17-Mar-09 2:46
professional Xmen Real 17-Mar-09 2:46 
GeneralRe: how to get out from the outer for Pin
Pete O'Hanlon17-Mar-09 2:57
mvePete O'Hanlon17-Mar-09 2:57 
GeneralRe: how to get out from the outer for Pin
Xmen Real 17-Mar-09 3:00
professional Xmen Real 17-Mar-09 3:00 
GeneralRe: how to get out from the outer for Pin
Pete O'Hanlon17-Mar-09 3:29
mvePete O'Hanlon17-Mar-09 3:29 
GeneralRe: how to get out from the outer for Pin
Xmen Real 17-Mar-09 3:35
professional Xmen Real 17-Mar-09 3:35 
GeneralRe: how to get out from the outer for Pin
Pete O'Hanlon17-Mar-09 3:42
mvePete O'Hanlon17-Mar-09 3:42 
GeneralRe: how to get out from the outer for Pin
Eddy Vluggen17-Mar-09 6:04
professionalEddy Vluggen17-Mar-09 6:04 
Questionhow can i change the sample rate and sample size of wave files Pin
ahmedhassan9617-Mar-09 0:12
ahmedhassan9617-Mar-09 0:12 
QuestionVS 2008 - Setup project: Change Link Icon in Program Menu Pin
dj_jeff17-Mar-09 0:10
dj_jeff17-Mar-09 0:10 
Questionhow to catch these events? Pin
abhiram_nayan17-Mar-09 0:01
abhiram_nayan17-Mar-09 0:01 
AnswerRe: how to catch these events? Pin
Eddy Vluggen17-Mar-09 0:50
professionalEddy Vluggen17-Mar-09 0:50 
GeneralRe: how to catch these events? Pin
abhiram_nayan17-Mar-09 1:02
abhiram_nayan17-Mar-09 1:02 
GeneralRe: how to catch these events? Pin
Eddy Vluggen17-Mar-09 1:41
professionalEddy Vluggen17-Mar-09 1:41 
QuestionWhat's name of this code ? Pin
Mohammad Dayyan16-Mar-09 23:28
Mohammad Dayyan16-Mar-09 23:28 
AnswerRe: What's name of this code ? Pin
DaveyM6916-Mar-09 23:30
professionalDaveyM6916-Mar-09 23:30 

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.