This code iterates through all generic types in the System assembly and writes out their type parameter information. The nested foreach cycle goes through the type parameters, and uses the GenericParameterAttributes property of System.Type to obtain information about variance.
The C# design team felt that they should complete the COM interoperability picture in version 4.0, and they added great COM - specifi c features to the language, such as COM type import with the dynamic type, simplifi ed syntax for indexed properties, automatic code generation for omitted ref parameters, and support for the no - PIA compilation.
C# 4.0 introduced new forms of variance. With type parameters of generic interfaces and delegates signifi ed as covariant or contravariant, from now on, the programming language has a much more fl exible type substitution model than ever before.