Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
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.

Compiler Error C3721

'signature': incompatible signature for event

An event was declared incorrectly. For more information, see __event.

C3721 is only reachable using /clr:oldSyntax.

The following sample generates C3721.

// C3721.cpp
// compile with: /clr:oldSyntax /c
using namespace System;

public __delegate void MyDel();

public __gc class X {
   __event void add_E1();      // C3721
   // try the following line instead
   // __event void add_E1(MyDel * p);

   __event void remove_E1();   // C3721
   // __event void remove_E1(MyDel * p);
   // try the following line instead

   __event void raise_E1();

Community Additions

© 2015 Microsoft