I tried to create a custom .NET attribute with the code below but accidentally left off the subclass. This generated an easily-fixed compiler error shown in the comment.
With ReSharper you can use [JetBrains.Annotations.BaseTypeRequired(typeof(YouBaseType))]
[JetBrains.Annotations.BaseTypeRequired(typeof(YouBaseType))]