I'm currently converting a class from C# to Visual Basic 2010.
Most parts have worked fine until I came to the EventHandlers. I haven't been able to convert the following line of code into Visual Basic, neither by myself nor using a converter:
public event EventHandler<StringEventArgs> ServerMessage = delegate { };
The converters' codes only gives me the error "End of statement expected":
Public Event ServerMessage As EventHandler(Of StringEventArgs) = Sub()
End Sub
So, does the delegate { }
part even need to be translated to Visual Basic code?
If so, how can I convert it properly?
If not, is it enough just using the following:
Public Event ServerMessage As EventHandler(Of StringEventArgs)
?