共用方式為


編譯器錯誤 C3393

條件約束子句中語法錯誤:'identifier' 不是型別

傳遞給條件約束的識別項必須是類型,但卻不是類型。 如需詳細資訊,請參閱泛型型別參數的限制式 (C++/CLI)

範例

下列範例會產生 C3393:

// C3393.cpp
// compile with: /clr /c
void MyInterface() {}
interface class MyInterface2 {};

generic<typename T>
where T : MyInterface   // C3393
// try the following line instead
// where T : MyInterface2
ref class R {};