Code inspection: Base type is required
Last modified: 11 February 2024tip
One of the ReSharper annotation attributes is the BaseTypeRequired attribute, which ensures that classes marked with this attribute derive from a specific class. Consider the snippet below:
In this snippet, the Marine
class will generate a warning because the Friendly
attribute it’s tagged with expects the class to be derived from Soldier
. The following change fixes the problem: