我将我的程序从6.0升级到.Net但我得到了一些错误请帮助我修复它

问题描述:

我已添加评论到我有错误的地方

i have added comments to where i have bugs

Private Sub StopProxy()
        Dim Socket As AxMSWinsockLib.AxWinsock

        'looping each connections and close 'em
        SendToLog("Disconnecting all connection")
        For Each Socket In sckServer

            tmrServer(Socket.Index).Enabled = False 'the erro am having is index not a member of AxMSWinsockLib.AxWinsock
            tmrClient(Socket.Index).Enabled = False 'the erro am having is index not a member of AxMSWinsockLib.AxWinsock
            System.Windows.Forms.Application.DoEvents()
            CloseSocket(Socket.Index) 'the erro am having is index not a member of AxMSWinsockLib.AxWinsock
        Next Socket
        SendToLog("Proxy server stopped")
    End Sub

参见 https://msdn.microsoft.com/en-us/library/system.net.sockets.socket%28v=vs .110%29.aspx [ ^ ]以获得正确的套接字支持。
See https://msdn.microsoft.com/en-us/library/system.net.sockets.socket%28v=vs.110%29.aspx[^] for proper sockets support.