I have a list initially consisting of 1 line:
One Two Three Four Five Six Seven
Then I would have the following in the list - note how I have 2 columns - the first column for an odd number, the second column for an even number:
One Two Three Four Five Six Seven
I am trying to do the following:
foreach(var item in mod) { int i = 0; i = i + 1; if (i % 2 == 0) { //add to list here for even number } if (i % 2 != 0) { // add to list here for odd number } }
source share