类型参数名 " <typeparametername1> " 与在 <typeparametername2> "" 的某个其他分部类型上定义的相应类型参数的名称 "" 不匹配 <partialtypename>Type parameter name '<typeparametername1>' does not match the name '<typeparametername2>' of the corresponding type parameter defined on one of the other partial types of '<partialtypename>'

在多个分部声明中定义的泛型类或结构与类型形参规范冲突。A generic class or structure is defined in multiple partial declarations with conflicting type parameter specifications.

在多个分部声明中划分类或结构的定义时,编译器将该类型视为其所有分部声明的联合。When you divide the definition of a class or structure among several partial declarations, the compiler treats the type as the union of all its partial declarations. 这不仅适用于成员,还适用于实现、继承和访问级别。This applies not only to the members but also to the implementation, inheritance, and access level.

不能在泛型类或结构的定义中为任何类型形参指定多个名称。You cannot specify multiple names for any type parameter in the definition of a generic class or structure.

错误 ID: BC30931Error ID: BC30931

更正此错误To correct this error

  • 确定类型形参的名称,并在每个分部声明中使用相同的名称。Decide what name the type parameter should have, and use the same name in every partial declaration.

另请参阅See also