generics type instantiation

This is a discussion on generics type instantiation within the C# Programming forums, part of the General Programming Boards category; Hello everyone,
In C++ template, the type parameter will be deduced when we use it, and compiler will generate the ...

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? :-)

For reference type, all generics types will share one instance of native code. In the following case, type Foo<Goo1> and Foo<Goo2> (suppose Goo1 and Goo2 are both reference types) will share one static member if we have one static member defined in type Foo<>?