Answers for "@razor identify last foreach"

C#
-2

@razor identify last foreach

int iteration=0;
foreach (var item in items)
  {
    iteration++;
    if (iteration < items.Count)
       {
        //do stuff  
       }              
   }
Posted by: Guest on May-27-2020

C# Answers by Framework

Browse Popular Code Answers by Language