I would like to shadow/override an event in VB.NET.
I do it only because I have to implement in this object an interface, that contains the same event like the base object itself, and I need to keep this base event as is it without modification nor supplementary event additions.
How can I do it?
Public Shadows Event VisibleChanged As EventHandler Implements IVisibleChanged
So, I would like to implement a interface that contains VisibleChanged event, but to keep functional the myBase VisibleChanged event too.
Public Shadows Event VisibleChanged As EventHandler Implements IVisibleChanged
AddHandler(ByVal value As EventHandler)
AddHandler MyBase.VisibleChanged, value
End AddHandler
RemoveHandler(ByVal value As EventHandler)
RemoveHandler MyBase.VisibleChanged, value
End RemoveHandler
End Event
something like this, but it seems Visual Studio does not recognize such a syntax...
I mean, in C# I realize it like this:
public new event EventHandler VisibleChanged
{
add { base.VisibleChanged += value; }
remove { base.VisibleChanged -= value; }
}