title: How to make .NET attribute only valid on certain types
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1190649/specify-required-base-class-for-net-attribute-targets">Specify required base class for .NET attribute targets</a>  </p>
  </blockquote>
  
  
  
  <p>I want to specify that my custom attribute only be valid on certain types (based on interface or base class).<br>
  Like this:  </p>
  
  <p><img src="https://i.stack.imgur.com/te0cw.png" alt="attributes">  </p>
  
  <p>How can I do that?</p>