ReSharper 2017.2 Help

Code Inspection: BaseTypeRequired attribute supports only classes and interfaces

The BaseTypeRequired attribute requires the type parameter to be a class or an interface. Consequently, applying it to value types is likely to lead to an error. For example, the following will generate a warning:

struct Person { } [BaseTypeRequired(typeof(Person))] class FriendlyAttribute : Attribute { }
Last modified: 14 December 2017

See Also