這段代碼是C#的,現在給他改為VB.NET,報錯:
Event ClientCountChanged As CbDelegate(Of Integer)是事件,不能直接呼叫,請使用RaiseEvent引發事件,這個怎么改為VB?
C#代碼:
private ITcpServerEngine tcpServerEngine;
this.tcpServerEngine.ClientCountChanged += new CbDelegate<int>(tcpServerEngine_ClientCountChanged);這兒改為:Me.tcpServerEngine.ClientCountChanged += New CbDelegate(Of Integer)(AddressOf tcpServerEngine_ClientCountChanged)報錯
void tcpServerEngine_ClientCountChanged(int count)
{
this.ShowConnectionCount(count);
}
這個應該怎么改為VB.NET呢?
uj5u.com熱心網友回復:
還是自己搞定轉載請註明出處,本文鏈接:https://www.uj5u.com/net/34605.html
標籤:VB.NET
