Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
QuestionGet Tittle Name for window form ? Pin
aa_zz31-Mar-10 15:38
aa_zz31-Mar-10 15:38 
AnswerRe: Get Tittle Name for window form ? [modified] Pin
Luc Pattyn31-Mar-10 16:28
sitebuilderLuc Pattyn31-Mar-10 16:28 
QuestionWhich is faster ? foreach OR for !! Pin
Nadia Monalisa31-Mar-10 14:47
Nadia Monalisa31-Mar-10 14:47 
AnswerRe: Which is faster ? foreach OR for !! Pin
Luc Pattyn31-Mar-10 14:53
sitebuilderLuc Pattyn31-Mar-10 14:53 
GeneralRe: Which is faster ? foreach OR for !! Pin
Not Active31-Mar-10 15:26
mentorNot Active31-Mar-10 15:26 
GeneralRe: Which is faster ? foreach OR for !! Pin
Luc Pattyn31-Mar-10 15:34
sitebuilderLuc Pattyn31-Mar-10 15:34 
GeneralRe: Which is faster ? foreach OR for !! Pin
Som Shekhar31-Mar-10 16:05
Som Shekhar31-Mar-10 16:05 
GeneralRe: Which is faster ? foreach OR for !! Pin
Luc Pattyn31-Mar-10 16:17
sitebuilderLuc Pattyn31-Mar-10 16:17 
GeneralRe: Which is faster ? foreach OR for !! Pin
Not Active31-Mar-10 16:33
mentorNot Active31-Mar-10 16:33 
GeneralRe: Which is faster ? foreach OR for !! Pin
Luc Pattyn31-Mar-10 16:35
sitebuilderLuc Pattyn31-Mar-10 16:35 
GeneralRe: Which is faster ? foreach OR for !! Pin
Som Shekhar31-Mar-10 16:38
Som Shekhar31-Mar-10 16:38 
GeneralRe: Which is faster ? foreach OR for !! Pin
DaveyM691-Apr-10 6:06
professionalDaveyM691-Apr-10 6:06 
GeneralRe: Which is faster ? foreach OR for !! Pin
Hercule Poirot1-Apr-10 6:35
Hercule Poirot1-Apr-10 6:35 
JokeRe: Which is faster ? foreach OR for !! Pin
Eddy Vluggen31-Mar-10 15:51
professionalEddy Vluggen31-Mar-10 15:51 
GeneralRe: Which is faster ? foreach OR for !! Pin
Not Active31-Mar-10 16:05
mentorNot Active31-Mar-10 16:05 
GeneralRe: Which is faster ? foreach OR for !! Pin
AspDotNetDev31-Mar-10 17:30
protectorAspDotNetDev31-Mar-10 17:30 
AnswerRe: Which is faster ? foreach OR for !! Pin
PIEBALDconsult31-Mar-10 14:58
mvePIEBALDconsult31-Mar-10 14:58 
0) Yes, foreach may be more readable
1) for is generally quicker than foreach.
2) In some cases, you can't use for.
3) With foreach, you can't alter the collection
4) Breaking out of a foreach is generally poor design
4.1) Same with for, but you can set the test appropriately

In conclusion, it depends on the situation.
GeneralRe: Which is faster ? foreach OR for !! Pin
AspDotNetDev31-Mar-10 17:28
protectorAspDotNetDev31-Mar-10 17:28 
GeneralRe: Which is faster ? foreach OR for !! Pin
PIEBALDconsult31-Mar-10 18:19
mvePIEBALDconsult31-Mar-10 18:19 
GeneralRe: Which is faster ? foreach OR for !! Pin
AspDotNetDev31-Mar-10 19:21
protectorAspDotNetDev31-Mar-10 19:21 
Questionresume data - your idea plz... Pin
Jassim Rahma31-Mar-10 11:43
Jassim Rahma31-Mar-10 11:43 
AnswerRe: resume data - your idea plz... Pin
PIEBALDconsult31-Mar-10 11:52
mvePIEBALDconsult31-Mar-10 11:52 
GeneralRe: resume data - your idea plz... Pin
Jassim Rahma31-Mar-10 11:54
Jassim Rahma31-Mar-10 11:54 
GeneralRe: resume data - your idea plz... Pin
Super Lloyd31-Mar-10 12:31
Super Lloyd31-Mar-10 12:31 
GeneralRe: resume data - your idea plz... Pin
Jassim Rahma31-Mar-10 12:34
Jassim Rahma31-Mar-10 12:34 

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.