Compiler Error C3722
a generic event is not allowed
The compiler only allows generic classes, structs, and functions. For more information, see Generics.
The following sample generates C3722:
// C3722.cpp
// compile with: /clr
generic <typename T>
public delegate void MyEventHandler(System::Object^ sender, System::EventArgs^ e, T optional);
generic <class T>
public ref struct MyButton {
generic<typename U>
event MyEventHandler<U>^ Click; // C3722
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for