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

C#

 
GeneralRe: c# back up program ? :S Pin
Luc Pattyn17-Sep-09 12:02
sitebuilderLuc Pattyn17-Sep-09 12:02 
GeneralRe: c# back up program ? :S Pin
Not Active17-Sep-09 12:06
mentorNot Active17-Sep-09 12:06 
GeneralRe: c# back up program ? :S Pin
booo2222222222222217-Sep-09 12:13
booo2222222222222217-Sep-09 12:13 
GeneralRe: c# back up program ? :S Pin
EliottA17-Sep-09 12:16
EliottA17-Sep-09 12:16 
GeneralRe: c# back up program ? :S Pin
booo2222222222222217-Sep-09 12:21
booo2222222222222217-Sep-09 12:21 
GeneralRe: c# back up program ? :S Pin
Richard MacCutchan17-Sep-09 23:03
mveRichard MacCutchan17-Sep-09 23:03 
AnswerRe: c# back up program ? :S Pin
Vimalsoft(Pty) Ltd17-Sep-09 20:45
professionalVimalsoft(Pty) Ltd17-Sep-09 20:45 
Questionforeach simple question Pin
JollyMansArt17-Sep-09 10:14
JollyMansArt17-Sep-09 10:14 
I have not used foreach before but I know that the foreach method in what I am trying to do will simplify things emensely. I can adapt after I can see a example.

What I want to do is this:

I have an List<string> of 10 objects so lets call List<string> MyList

foreach (int i = <odd number=""> in MyList.count)
{
Messagebox(Mylist[i])
}


So in the above example It would output 1,3,5,7,9. How would I do this?
Another side point if foreach work not like the above example but like how my other theory is All the ODD number increments will contain "%" the percent sign. But the even values will contain only letters a-z and 0-9.


I don't want to have to do it the way I know how which is double incrementing...
For (i = 0; i < MyList.count; i++)
{
do work
i++
}
AnswerRe: foreach simple question Pin
Ian Shlasko17-Sep-09 10:28
Ian Shlasko17-Sep-09 10:28 
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 
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 

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.