Compiler Error CS0261

Partial declarations of 'type' must be all classes, all structs, or all interfaces

This error occurs if a partial type is declared as a different type of construct in various places. For more information, see Partial Classes and Methods.

The following sample generates CS0261:

// CS0261.cs  
partial class A  // CS0261 – A declared as a class here, but as a struct below  
{  
}  
  
partial struct A  
{  
}