This is due to delayed execution, the main feature of Linq.
, var, . . , . .
Linq, . b/c, , , , , . , -, . ( , , , perl PHP).
, , .
var myPosse = from p1 in people
select p1;
List<Person> theTeam = myPosse.ToList();
label1.Text = "All my peeps:" + Environment.NewLine;
people.Add(new Person{FirstName="Don", LastName="Cash"});
foreach (Person p in theTeam)
{
this.label1.Text += p.ToString() + Environment.NewLine;
}
ToList(). Linq .ToList(). , "" IEnumerable.