using System.Text;
public class Example
{
public static void Main()
{
DisplayListT();
}
private static void DisplayListT()
{
var theCollections = new List<Codekiller>
{
new Codekiller() { Name="honggildong", Age=47},
new Codekiller() { Name="superman", Age=25},
new Codekiller() { Name="batman", Age=0},
new Codekiller() { Name="catman", Age=3}
};
foreach (Codekiller col in theCollections)
{
Console.WriteLine(col.Name + " " + col.Age);
}
}
}
public class Codekiller
{
public string Name { get; set; }
public int Age { get; set; }
}