Hi here is my example let's say
class A { }
class B : A { }
void test<T>(T clazz)
{
Console.WriteLine("clazz type = {0} T type = {1}",
clazz.GetType().Name,
typeof(T).Name);
}
static void Main(string[] args)
{
A b = new B();
test(b);
Console.ReadLine();
}
The result is clazz= B T= A ????? why inference generic type doesn't take into account polymorphism ?