Edit

Share via


'Class' constraint cannot be specified multiple times for the same type parameter

A constraint list includes the Class (Visual Basic) constraint more than once.

A constraint list on a type parameter can specify that the type argument passed to that type parameter must be a value type (with the Structure (Visual Basic) constraint) or must be a reference type (with the Class constraint). You cannot specify both constraints on the same type parameter, and you cannot specify either one more than once.

Error ID: BC32101

To correct this error

  • Remove any redundant Class keywords. You should have only one in the constraint list.

See also