Click here to Skip to main content
15,923,197 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I found out which dlls my (managed/unmanaged) dll depends on ... programmatically ! Pin
Ravi Bhavnani30-Apr-08 5:35
professionalRavi Bhavnani30-Apr-08 5:35 
GeneralRe: How can I found out which dlls my (managed/unmanaged) dll depends on ... programmatically ! Pin
PIEBALDconsult30-Apr-08 6:29
mvePIEBALDconsult30-Apr-08 6:29 
GeneralRe: How can I found out which dlls my (managed/unmanaged) dll depends on ... programmatically ! Pin
Ravi Bhavnani30-Apr-08 6:34
professionalRavi Bhavnani30-Apr-08 6:34 
GeneralRe: How can I found out which dlls my (managed/unmanaged) dll depends on ... programmatically ! Pin
PIEBALDconsult30-Apr-08 6:42
mvePIEBALDconsult30-Apr-08 6:42 
QuestionHow to call .NET 2.0 dll from .NET 1.1 ? Pin
ivix4u30-Apr-08 0:06
ivix4u30-Apr-08 0:06 
AnswerRe: How to call .NET 2.0 dll from .NET 1.1 ? Pin
Simon P Stevens30-Apr-08 1:50
Simon P Stevens30-Apr-08 1:50 
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 
Foreach basically just calls GetEnumerator() on your collection, and then repeatedly calls MoveNext() on the enumerator to move through the collection.

No real difference. If your interested in performance, try it and time it, I suspect it makes nears as no difference.

Only con I can think of is that you can't modify a collection (add/remove) while you are foreaching through it, but you could if you just looped with an index (Although I wouldn't recommend it, you'd most likely screw something up, and miscount with your index or something)

Personally, I use for each most of the time. I can't think of the last time I used a normal for loop to go through a collection.

Simon

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 
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 

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.