Do something like
for(int i=0; i< GroupOfPeople.Count; i++)
{
GroupOfPeople nm = (GroupOfPeople) nm.GroupOfPeople[i];
if(i < GroupOfPeople.Count - 1)
names += nm.FirstName + ", ";
else
names += " and " + nm.FirstName;
}
solved C# ASP.NET for loop issue [closed]