This documentation is archived and is not being maintained.

Compiler Error CS0261 

Error Message

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 Class Definitions (C# Programming Guide).

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