Click here to Skip to main content
14,366,620 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 5:15
memberhoney the codewitch14-Sep-19 5:15 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
lopatir14-Sep-19 5:22
memberlopatir14-Sep-19 5:22 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 5:24
memberhoney the codewitch14-Sep-19 5:24 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
GuyThiebaut14-Sep-19 5:24
professionalGuyThiebaut14-Sep-19 5:24 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 5:26
memberhoney the codewitch14-Sep-19 5:26 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
Nand3214-Sep-19 5:25
memberNand3214-Sep-19 5:25 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 6:54
memberhoney the codewitch14-Sep-19 6:54 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
Sander Rossel14-Sep-19 6:11
professionalSander Rossel14-Sep-19 6:11 
Depending on the length of the array, just let it loop Big Grin | :-D
I rarely use break or continue (break slightly more often, but probably only a handful in my entire career).
I've never used goto, except to mock you I think Big Grin | :-D
I'd use FirstOrDefault here (which probably uses a break, I don't know).
This kind of functionality is embedded in .NET, so why would I write my own?
But if I had to pick, I'd choose the break, which far more clearly communicates intent than i=arr.Length;.
honey the codewitch wrote:
} // braces copyright Sander Rossel
So proud of my honeycode the witch Big Grin | :-D

GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 6:13
memberhoney the codewitch14-Sep-19 6:13 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
harold aptroot14-Sep-19 6:40
memberharold aptroot14-Sep-19 6:40 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
Night Fox Localhost14-Sep-19 8:16
memberNight Fox Localhost14-Sep-19 8:16 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
Gary R. Wheeler14-Sep-19 10:28
memberGary R. Wheeler14-Sep-19 10:28 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 10:38
memberhoney the codewitch14-Sep-19 10:38 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
Gary R. Wheeler15-Sep-19 2:45
memberGary R. Wheeler15-Sep-19 2:45 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch15-Sep-19 4:37
memberhoney the codewitch15-Sep-19 4:37 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
q1213q14-Sep-19 13:32
memberq1213q14-Sep-19 13:32 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 13:39
memberhoney the codewitch14-Sep-19 13:39 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
q1213q14-Sep-19 13:48
memberq1213q14-Sep-19 13:48 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 13:49
memberhoney the codewitch14-Sep-19 13:49 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
q1213q14-Sep-19 14:07
memberq1213q14-Sep-19 14:07 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 14:11
memberhoney the codewitch14-Sep-19 14:11 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
q1213q14-Sep-19 14:24
memberq1213q14-Sep-19 14:24 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 14:27
memberhoney the codewitch14-Sep-19 14:27 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
q1213q14-Sep-19 14:56
memberq1213q14-Sep-19 14:56 
GeneralRe: for those of you purists that don't like break, continue and goto Pin
honey the codewitch14-Sep-19 15:06
memberhoney the codewitch14-Sep-19 15:06 

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.