How to ignore EventHandler serialization?

I have EventHandler in my program.
I tried to add “event” keyword, I tried to use [field:NonSerialized]/[XmlIgnore], but still have System.EventHandler cannot be serialized because it does not have a default public constructor error.
Hot to prevent EventHandler serialization?

To serialize / deserialize a class, the serializer requires a parameterless constructor. So, you need to add the parameterless constructors to your classes.

You need to declare the variables inside the function you are making or in the begin of the class file.