how to loop through a last in C# code example
Example: @razor identify last foreach
int iteration=0;
foreach (var item in items)
{
iteration++;
if (iteration < items.Count)
{
//do stuff
}
}
int iteration=0;
foreach (var item in items)
{
iteration++;
if (iteration < items.Count)
{
//do stuff
}
}