Compiler Error C2353
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C2353

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
© 2015 Microsoft