Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.46 KB

bc32113.md

File metadata and controls

29 lines (21 loc) · 1.46 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Type parameter '<typeparametername>' cannot be constrained to itself: '<errormessage>'
Type parameter '<typeparametername>' cannot be constrained to itself: '<errormessage>'
07/20/2015
bc32113
vbc32113
BC32113
a74128ae-11d0-46bf-8c0b-c7a2bf881d17

Type parameter '<typeparametername>' cannot be constrained to itself: '<errormessage>'

A constraint list for a type parameter includes that same type parameter.

A constraint list on a type parameter can specify any number of interfaces and at most one class. A type argument supplied for that type parameter must implement every specified interface and inherit from the specified class. The compiler requires interfaces and classes that are already defined when it encounters a constraint list. A type parameter is not considered as a defined type until it is replaced by a suitable type argument supplied by code creating the generic type.

Error ID: BC32113

To correct this error

  1. Check the spelling of both the type parameter and the constraints in its constraint list.

  2. If there are no spelling mistakes, remove the type parameter's name from its constraint list. It cannot be constrained to itself.

See also