Compiler Error CS0260

Missing partial modifier on declaration of type 'type'; another partial declaration of this type exists

This error indicates that you have declared multiple classes that have the same name. In addition, at least one but not all of the declarations contains the partial modifier. If you want to define a class in several parts, you must declare each part by using the keyword partial.

This error also occurs if you declare a class and accidentally give it the same name as a partial class that's declared elsewhere in the same namespace.

The following sample generates CS0260:

// CS0260.cs  
// You must mark both parts of the definition of class C
// by using the partial keyword.  
  
// The following line causes CS0260. To resolve the error, add  
// the 'partial' keyword to the declaration.  
class C
{  
}  
  
partial class C  
{  
}  

See also