Using System; using System. collections. generic; using System. text; using System. diagnostics; using System. data; namespace TestList {class Program {static void Main (string [] args) {List <DateTime> list = new List <DateTime> (); list <string> list2 = new List <string> (); for (int I = 1; I <= 30; I ++) {DateTime TestTime = new DateTime (2009,11, i); list. add (TestTime);} Action <DateTime> trace = delegate (DateTime DVa Lue) {DValue = DValue. addMonths (1); // Add a month // Trace. writeLine (DValue); // adds the information to the written Trace. listeners [0]. attributes. add (DValue. toString ("yyyyMMdd"), DValue. toString ("yyyyMMdd"); // Console. writeLine (DValue. toString ("yyyyMMdd") ;}; Predicate <DateTime> isPrime = delegate (DateTime DValue) {// when the date is an even number, the opposite is no return (DValue. day % 2 = 0 )? True: false ;}; list. ForEach (trace); List <DateTime> primes =List. FindAll(IsPrime); foreach (DateTime temp in list) Console. writeLine (Trace. listeners [0]. attributes [temp. addMonths (1 ). toString ("yyyyMMdd")]. toString (); foreach (DateTime temp in primes) Console. writeLine (temp. toString ("yyyyMMdd"); Console. readLine ();}}}