Here is my code:
int Temp = 200;
List<int> PrimeBuilders = new List<int>();
PrimeBuilders.Add(200);
PrimeBuilders.Add(300);
PrimeBuilders.Add(400);
PrimeBuilders.Add(500);
PrimeBuilders.Add(200);
PrimeBuilders.Add(600);
PrimeBuilders.Add(400);
foreach(int A in PrimeBuilders)
{
}
How can I go through the list and output the index that does not contain the number assigned to Temp?
foreachdoesn't really deal with indexes, you'd be better to use a for loop, or maintain your own counter.