课堂上的新房产?

时间:2014-11-15 16:26:09

标签: vb.net lidgren

嗯,我的问题很简单。

我想将属性添加到预定义的类中。

Imports Lidgren.Network

Module Socket
    Public Clients As List(Of NetConnection) = New List(Of NetConnection)

需要添加"索引"财产,所以它是"客户(发件人).Index"

1 个答案:

答案 0 :(得分:1)

您使用List(Of T)以便访问IndexOf method - 它会在集合中返回从零开始的位置。

Dim i As Integer = Clients.IndexOf(sender)
相关问题