0

Well, my question is simple.

I want to add a property to a pre - defined class.

Imports Lidgren.Network

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

Need to add the "index " property , so that it is " Clients (sender ) .Index "

user3571412
  • 105
  • 1
  • 9

1 Answers1

1

Your using a List(Of T) so you have access to it's IndexOf method - it returns the zero-based position in the collection.

Dim i As Integer = Clients.IndexOf(sender)
OneFineDay
  • 9,004
  • 3
  • 26
  • 37