This documentation is archived and is not being maintained.

Compiler Error CS0263 

Error Message

Partial declarations of 'type' must not specify different base classes

When defining a type in partial declarations, specify the same base types in each of the partial declarations. For more information, see Partial Class Definitions (C# Programming Guide).

The following sample generates CS0263:


// CS0263.cs
// compile with: /target:library
class B1
{
}

class B2
{
}
partial class C : B1  // CS0263 – is the base class B1 or B2?
{
}

partial class C : B2
{
}
Show: