|Dotfuscator > References > Configuration File Reference > Custom Rules Reference > Exclusion Rules > Excluding By Supertype|
Types may be selectively excluded by supertype. A supertype rule selects a type based on matching against the names of types that the given type inherits from. One or more supertype rules may be nested inside any rule that selects types.
A type rule may have multiple supertype rules associated with it. In this case, an item is selected if at least one of the supertype rules selects it.
The following example selects all types that inherit from
|All Types that Inherit from MySupertype:||
<type name=".*" excludetype="false" regex="true"> <supertype name="MySupertype"/> </type>
Supertype rules can also be written using regular expressions to match supertype names. The following example shows how to select all types that inherit from either
|All Types that Inherit from MySupertype or MyOtherSupertype:||
<type name=".*" excludetype="false" regex="true"> <supertype name="My.*Supertype" regex="true"/> </type>