Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3388
Collapse the table of content
Expand the table of content

Compiler Error C3388

Error Message

'type' : not allowed as a constraint, assuming 'ref class' to continue parsing

A constraint was specified on a generic type, but the constraint was not specified correctly. See Constraints for more information.


The following sample generates C3388.

// C3388.cpp
// compile with: /clr /c
interface class AA {};

generic <class T>
where T : interface class   // C3388
ref class C {};

// OK
generic <class T>
where T : AA
ref class D {};

Community Additions

© 2015 Microsoft