
May 5th, 2008, 12:49 AM
|
|
Contributing User
|
|
Join Date: May 2006
Posts: 498
Time spent in forums: 1 Day 10 h 28 m 33 sec
Reputation Power: 2
|
|
|
Generics type instantiation
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
|