Click here to Skip to main content
15,884,353 members
Home / Discussions / C#
   

C#

 
Questionforeach and IEnumerator Pin
George_George29-Apr-08 23:58
George_George29-Apr-08 23:58 
AnswerRe: foreach and IEnumerator Pin
Simon P Stevens30-Apr-08 0:41
Simon P Stevens30-Apr-08 0:41 
GeneralRe: foreach and IEnumerator Pin
Pete O'Hanlon30-Apr-08 1:40
mvePete O'Hanlon30-Apr-08 1:40 
GeneralRe: foreach and IEnumerator Pin
George_George30-Apr-08 3:41
George_George30-Apr-08 3:41 
GeneralRe: foreach and IEnumerator Pin
Pete O'Hanlon30-Apr-08 11:55
mvePete O'Hanlon30-Apr-08 11:55 
GeneralRe: foreach and IEnumerator Pin
George_George1-May-08 2:34
George_George1-May-08 2:34 
GeneralRe: foreach and IEnumerator Pin
George_George30-Apr-08 3:40
George_George30-Apr-08 3:40 
AnswerRe: foreach and IEnumerator Pin
PIEBALDconsult30-Apr-08 5:39
mvePIEBALDconsult30-Apr-08 5:39 
Yeah, what they said.

Plus, some times a method takes a parameter of type IEnumerable so foreach is about the only option open to you, contrasted with a method that takes an array and you can choose.

If you have the choice to use foreach, for, or while and all you are trying to do is find one item in the collection; then foreach is somewhat frowned upon.
GeneralRe: foreach and IEnumerator Pin
Simon P Stevens30-Apr-08 6:43
Simon P Stevens30-Apr-08 6:43 
GeneralRe: foreach and IEnumerator Pin
PIEBALDconsult30-Apr-08 6:48
mvePIEBALDconsult30-Apr-08 6:48 
GeneralRe: foreach and IEnumerator Pin
Simon P Stevens30-Apr-08 11:21
Simon P Stevens30-Apr-08 11:21 
GeneralRe: foreach and IEnumerator Pin
Pete O'Hanlon30-Apr-08 11:30
mvePete O'Hanlon30-Apr-08 11:30 
GeneralRe: foreach and IEnumerator Pin
George_George1-May-08 2:33
George_George1-May-08 2:33 
GeneralRe: foreach and IEnumerator Pin
Pete O'Hanlon1-May-08 8:41
mvePete O'Hanlon1-May-08 8:41 
GeneralRe: foreach and IEnumerator Pin
George_George1-May-08 22:05
George_George1-May-08 22:05 
GeneralRe: foreach and IEnumerator Pin
George_George1-May-08 2:32
George_George1-May-08 2:32 
GeneralRe: foreach and IEnumerator Pin
George_George1-May-08 2:31
George_George1-May-08 2:31 
Question? implement a COM Components method. Pin
lgatcodeproject29-Apr-08 23:52
lgatcodeproject29-Apr-08 23:52 
AnswerRe: ? implement a COM Components method. Pin
Simon P Stevens29-Apr-08 23:55
Simon P Stevens29-Apr-08 23:55 
QuestionRe: ? implement a COM Components method. Pin
lgatcodeproject30-Apr-08 0:14
lgatcodeproject30-Apr-08 0:14 
AnswerRe: ? implement a COM Components method. Pin
Simon P Stevens30-Apr-08 0:49
Simon P Stevens30-Apr-08 0:49 
AnswerRe: ? implement a COM Components method. Pin
Rob Graham30-Apr-08 4:37
Rob Graham30-Apr-08 4:37 
QuestionHow to show resource files in my usercontrol 's property Pin
Guru Call29-Apr-08 23:23
Guru Call29-Apr-08 23:23 
AnswerRe: How to show resource files in my usercontrol 's property Pin
J a a n s30-Apr-08 1:32
professionalJ a a n s30-Apr-08 1:32 
QuestionSqlserver Triggers Pin
Member 400849229-Apr-08 23:02
Member 400849229-Apr-08 23:02 

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.