Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 672 Bytes

compiler-error-c3765.md

File metadata and controls

24 lines (20 loc) · 672 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3765
Compiler Error C3765
11/04/2016
C3765
C3765
feadee7a-fcfb-402c-af2f-0e656f814a13

Compiler Error C3765

'event': cannot define an event in a class/struct 'type' marked as an event_receiver

If a class is marked with the event_receiver attribute, the class cannot contain an __event declaration.

The following sample generates C3765:

// C3765.cpp
[event_receiver(native)]
struct ER2 {
   __event void f();   // C3765
   __event void b(int);   // C3765
};