I am looking at the old VB.net code
Public Event TagDetected(ByVal t As Tag)
...
RaiseEvent TagDetected(t)
that I am trying to convert to C#. My attempt:
public event EventHandler<Tag> TagDetected;
...
TagDetected(this, t.Clone());
doesn't work and gives me an error:
Error 1 The type 'XYZ.VKM.Common.Tag' cannot be used as type parameter 'TEventArgs' in the generic type or method 'System.EventHandler'. There is no implicit reference conversion from 'XYZ.VKM.Common.Tag' to 'System.EventArgs'.