George George

George George

  • NA
  • 778
  • 0

generics type instantiation

May 5 2008 1:53 AM

Hello everyone,


In C++ template, the type parameter will be deduced when we use it, and compiler will generate the speicifc version of template function/class -- called instantiation.

In C#, it is also compiler will do the instantiation at compile time other than runtime? For example, if we use int and string for List<T>, then two versions of List class, List<int> and List<string> will be generated in IL -- which will make IL bigger? :-)


thanks in advance,
George