Hi, I'm struggling to convert the below code to C#.
Class Class1
Implements IMyInterface
Public Event MyEvent(ByVal sender As Object, ByVal e As MyEventArgs) Implements IMyInterface.MyEvent
Public Sub New()
AddHandler Me.Slider.ValueChanged, AddressOf OnSliderValueChanged
End Sub
Private Sub OnSliderValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
RaiseEvent MyEvent(Me, New MyEventArgs())
End Sub
End Class
Here's what visual studio inserts when I ask it to implement for me:
event EventHandler<MyEventArgs> IMyInterface.MyEvent
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
With a bit of googling I'm sure I can find out what to replace the NotImplementedException parts with but VS is still telling me that the definition is not implemented anyway.