Aracılığıyla paylaş


Derleyici Hatası C3216

kısıtlaması 'tür' değil genel bir parametre olmalıdır

Açıklamalar

Bir kısıtlama oluşturuldu.

Example

Aşağıdaki örnek C3216 oluşturur:

// C3216.cpp
// compile with: /clr
interface struct A {};

generic <class T>
where F : A   // C3216
// Try the following line instead:
// where T : A    // C3216
ref class C {};

Aşağıdaki örnekte olası bir çözüm gösterilmektedir:

// C3216b.cpp
// compile with: /clr /c
interface struct A {};

generic <class T>
where T : A
ref class C {};