using System;
using System.Collections.Generic;
public static class Extensions
{
public static void PrintEach<T>(this IEnumerable<T> tList)
foreach (var t in tList)
Console.WriteLine(t);
}
public class Program
public static void Main()
/*
Create an IEnumerable<T> extension method that encapsulates the
foreach Console.Writeline for the ints array and then call it
on ints to print the values.
hint: https://msdn.microsoft.com/en-us/library/bb383977.aspx
*/
var ints = new [] { 1,2,5,9,10 };
ints.PrintEach();