Answers for "c# check if last item in foreach"

C#
3

c# check if element is last in list

foreach (var x in things)
	{
        //Do stuff
    	if (x == things.Last()) // Do Stuff only for the last item 
 	}
Posted by: Guest on September-02-2020

Code answers related to "c# check if last item in foreach"

C# Answers by Framework

Browse Popular Code Answers by Language