This project is read-only.
2
Vote

[Suggestion] Give a compile-time error when a generic class inherits from ContextBoundObject

description

class C<T> : System.ContextBoundObject { }
Currently it compiles successfully, but fails verification:
System.TypeLoadException: Generic context-bound objects are not supported.

comments

AlexTurnMSFT wrote Sep 11, 2014 at 1:52 AM

Hi vladres,

We've added this suggestion to our backlog of Roslyn analyzers we may implement in the future.

Thanks!