Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
'type': constraints on generic parameter 'parameter' differ from those on the declaration
Remarks
Multiple declarations must have the same generic constraints. For more information, see Generics.
Example
The following example generates C3868.
// C3868.cpp
// compile with: /clr /c
interface struct I1;
generic <typename T> ref struct MyStruct;
generic <typename U> where U : I1 ref struct MyStruct; // C3868
// OK
generic <typename T> ref struct MyStruct2;
generic <typename U> ref struct MyStruct2;
generic <typename T> where T : I1 ref struct MyStruct3;
generic <typename U> where U : I1 ref struct MyStruct3;