Compiler Error CS0267

The partial modifier can only appear immediately before 'class', 'record', 'struct', 'interface', or a method return type.

The placement of the partial modifier was incorrect in the declaration of the class, record, struct, interface, or method. To fix the error, reorder the modifiers. For more information, see Partial Classes and Methods.

The following sample generates CS0267:

public partial class MyClass
{
}

partial public class MyClass  // CS0267
// Try this line instead:
// public partial class MyClass
{
}