Base class '<baseclassname1>' specified for class '<partialclassname>' cannot be different from the base class '<baseclassname2>' of one of its other partial types

A class is defined in two or more partial declarations, which contain more than one Inherits Statement specifying more than one base class.

When you divide the definition of a class among several partial declarations, the compiler treats the class as the union of all its partial declarations. This applies not only to the members but also to the implementation, inheritance, and access level.

A class can implement more than one interface, but it cannot inherit from more than one base class. Therefore, all Inherits statements must specify the same base class.

Error ID: BC30928

To correct this error

  • Decide which class should be the base class of your partial class, and remove from its partial declarations any Inherits statement that specifies a different base class.

See also