using WhatIsHeDoing.Core.Extensions;
public static void Main()
Console.WriteLine("DateTime - GetNextWeekDay");
var date = new DateTime(2013, 3, 31);
const DayOfWeek dayDateToFind = DayOfWeek.Saturday;
var nextDayDate = date.GetNextWeekday(dayDateToFind);
Console.WriteLine("Date in the future? {0}", nextDayDate > date);
Console.WriteLine("Correct day found? {0}", dayDateToFind == nextDayDate.DayOfWeek);
Console.WriteLine("IEnumerable - Aggregate [with index]");
var collection = Enumerable.Range(3, 4);
var actual = collection.Aggregate(0, (agg, val, index) => index % 2 == 0 ? agg + val : agg);
const int expected = 3 + 5;
Console.WriteLine("Correct sum of even indices? {0}", expected == actual);