using System.Collections.Generic;
using System;
class MainClass
{
publicstaticvoid Main(string[] args)
{
List<MyClass> list = new List<MyClass>();
list.Add(new MyClass());
MyClass ass2 = list[0];
Console.WriteLine("\nFound in list: {0}", ass2);
}
}
class MyClass {
public override string ToString(){
return "my class";
}
}