Compiler Error CS0264
Partial declarations of 'type' must have the same type parameter names in the same order
This error occurs if you are defining a generic type in partial declarations and the type parameters are not consistent in name or order throughout all of the partial declarations. To get rid of this error, check the type parameters for each partial declaration and make sure the same name and order of parameters is used. For more information, see Partial Classes and Methods.and Generic Type Parameters.
Example
The following example generates CS0264.
// CS0264.cs
partial class MyClass<T> // CS0264
{
}
partial class MyClass <MyType>
{
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for