Standing on the shoulders of giants. RSS 2.0
# Monday, April 11, 2011

When you forward a generic type to another assembly [0] using the TypeForwardedTo attribute, you can’t specify the typeparameters. Instead the number of typeparameters in in the class definition depends the number of comma’s in definition.

using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Destination.SomeClass))] // Non generic

[assembly: TypeForwardedTo(typeof(Destination.SomeClass<>))] // equivalent to SomeClass<T>

[assembly: TypeForwardedTo(typeof(Destination.SomeClass<,>))] // equivalent to SomeClass<T,U>

More info on typeforwarding

Posted via email from Paul van Brenk's posterous

Monday, April 11, 2011 3:41:37 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] - Trackback

Comments are closed.
Ads
About
© Copyright 2012
Paul van Brenk
Sign In
newtelligence dasBlog 2.3.2011.0
All Content © 2012, Paul van Brenk
DasBlog theme 'Business' created by Christoph De Baene (delarou)