Compiler Error C2353
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Compiler Error C2353

Error Message

exception specification is not allowed

Exception specifications are not allowed on member functions of managed classes.

The following sample generates C2353:

// C2353.cpp
// compile with: /clr /c
ref class X {
   void f() throw(int);   // C2353
   void f();   // OK
© 2016 Microsoft