Summary: Find last item in collection, loop through and do something after when loop is finished (Collection.Count = Number of items). int i = 0;
foreach (Content content in ContentCollection)
{
i++;
// Gjør noe her...
if(i == ContentCollection.Count)
{
// Gjør det du vil gjøre etter siste rad her!
}
// Gjør noe annet her...
}
|