Porting an application from C# (1.1 framework) to VB.NET (3.5 framework), and I have this one last event based issue I cannot get my head around.
This is the original C# code
public delegate void SpecialEventHandler(object sender,SpecialEventArgs e);
public event SpecialEventHandler SpecialEvent = null;
_SpecialLogWriter SpecialWriter = new _SpecialLogWriter(this.SpecialEvent);
This is the converted VB.NET code
Public Delegate Sub SpecialEventHandler(ByVal sender as Object, ByVal e as SpecialEventArgs)
Public Event SpecialEvent as SpecialEventHandler
Dim SpecialWriter as New _SpecialLogWriter(Me.SpecialEvent)
The SpecialLogWriter constructor is expecting a SpecialEventHandler, but the Me.SpecialEvent in the constructor of SpecialLogWriter gives me the error message that this is an event and cannot be called directly.
Am I missing another delegate, or is this just one of this declaration issues between the languages?