Click here to Skip to main content
15,887,421 members
Home / Discussions / C#
   

C#

 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:04
JollyMansArt17-Sep-09 12:04 
AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 12:08
mvePIEBALDconsult17-Sep-09 12:08 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:15
JollyMansArt17-Sep-09 12:15 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:22
JollyMansArt17-Sep-09 12:22 
AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 13:06
mvePIEBALDconsult17-Sep-09 13:06 
AnswerRe: foreach simple question Pin
Ian Shlasko17-Sep-09 12:21
Ian Shlasko17-Sep-09 12:21 
AnswerRe: foreach simple question Pin
Luc Pattyn17-Sep-09 12:21
sitebuilderLuc Pattyn17-Sep-09 12:21 
AnswerRe: foreach simple question Pin
Christian Graus17-Sep-09 10:28
protectorChristian Graus17-Sep-09 10:28 
JollyMansArt wrote:
foreach (int i = in MyList.count)
{
Messagebox(Mylist[i])
}



foreach(object o in MyList)
{
MessageBox(o);
}

That's the whole point of foreach, you don't have to use an index to look anything up.

Christian Graus

Driven to the arms of OSX by Vista.

Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 10:32
mvePIEBALDconsult17-Sep-09 10:32 
GeneralRe: foreach simple question Pin
Christian Graus17-Sep-09 12:03
protectorChristian Graus17-Sep-09 12:03 
GeneralRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 12:05
mvePIEBALDconsult17-Sep-09 12:05 
GeneralRe: foreach simple question Pin
Christian Graus17-Sep-09 12:09
protectorChristian Graus17-Sep-09 12:09 
GeneralRe: foreach simple question Pin
Ian Shlasko17-Sep-09 12:30
Ian Shlasko17-Sep-09 12:30 
GeneralRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:36
JollyMansArt17-Sep-09 12:36 
GeneralRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 13:35
mvePIEBALDconsult17-Sep-09 13:35 
GeneralRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:09
JollyMansArt17-Sep-09 12:09 
AnswerRe: foreach simple question Pin
Not Active17-Sep-09 13:26
mentorNot Active17-Sep-09 13:26 
Questiongood books for XML With windows c# Pin
santosh_anu17-Sep-09 9:44
santosh_anu17-Sep-09 9:44 
AnswerRe: good books for XML With windows c# Pin
Christian Graus17-Sep-09 10:29
protectorChristian Graus17-Sep-09 10:29 
AnswerRe: good books for XML With windows c# Pin
PIEBALDconsult17-Sep-09 10:45
mvePIEBALDconsult17-Sep-09 10:45 
Questionhow to add more buttons,images and logos in messagebox in c#. Pin
Ramesh Reddy1111117-Sep-09 7:32
Ramesh Reddy1111117-Sep-09 7:32 
AnswerRe: how to add more buttons,images and logos in messagebox in c#. PinPopular
EliottA17-Sep-09 7:55
EliottA17-Sep-09 7:55 
GeneralRe: how to add more buttons,images and logos in messagebox in c#. Pin
Ian Shlasko17-Sep-09 8:12
Ian Shlasko17-Sep-09 8:12 
GeneralRe: how to add more buttons,images and logos in messagebox in c#. Pin
Luc Pattyn17-Sep-09 8:22
sitebuilderLuc Pattyn17-Sep-09 8:22 
JokeRe: how to add more buttons,images and logos in messagebox in c#. Pin
Manas Bhardwaj17-Sep-09 8:08
professionalManas Bhardwaj17-Sep-09 8:08 

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.