Home > Net >  VB Event ClientCountChanged As CbDelegate (Of Integer) is the Event, can't call, please use the
VB Event ClientCountChanged As CbDelegate (Of Integer) is the Event, can't call, please use the

Time:11-21

This code is c #, now give him to VB.NET, an error:
Event ClientCountChanged As CbDelegate (Of Integer) is the Event, cannot be called directly, please use the RaiseEvent trigger events, this how to VB?
C # code:
Private ITcpServerEngine tcpServerEngine;

This. TcpServerEngine. ClientCountChanged +=new CbDelegate (tcpServerEngine_ClientCountChanged); Here, Me. TcpServerEngine. ClientCountChanged +=New CbDelegate (Of Integer) (AddressOf tcpServerEngine_ClientCountChanged) error

Void tcpServerEngine_ClientCountChanged (int count)
{
Enclosing ShowConnectionCount (count);
}

This should be how to change to VB.NET?

CodePudding user response:

Or did you get
  • Related