using System; using System.Collections.Generic; // NOT using System.Linq; public class Example1{ public static void Main(){ // The average age of all females - basic version IEnumerable ageSum = Person.SomePersons .MyWhere(p => p.Sex == Sex.Female) .MySelect(p => p.Age); double result = (double)(ageSum.MyAggregate((sum,i) => sum + i)) / ageSum.MyCount(); Console.WriteLine("Result = {0}", result); // Result = 37,3333333333333 } }