I know in VB.Net there isn't an Index property on the Button control like it does in VB6. But I am trying to replicate a control array in VB.Net. I have created an array of buttons:

VB Code:
  1. Private Sub Form1_Load(ByVal sender As System.Object, _
  2.                    ByVal e As System.EventArgs) Handles MyBase.Load
  3.         Dim but(10) As Button
  4.         Dim i As Integer
  5.         Dim lngTop As Long = 10
  6.  
  7.  
  8.         For i = 1 To 6
  9.             but(i) = New Button()
  10.             With but(i)
  11.                 Me.Controls.Add(but(i))
  12.                 .BackColor = Color.AliceBlue
  13.                 .FlatStyle = FlatStyle.Standard
  14.                 .Text = "But(" & i & ")"
  15.                 .Name = "Button"
  16.                 .Left = 10
  17.                 .Top = lngTop
  18.                 .Tag = "UP"
  19.                 lngTop = (lngTop + but(i).Height) - 1.5
  20.                 .Visible = True
  21.                 AddHandler but(i).Click, AddressOf ButtonClick
  22.             End With
  23.         Next i
  24.     End Sub

But my question how do I pass the Button Array index to the following Sub:

VB Code:
  1. Private Sub ButtonClick(ByVal sender As Object, ByVal e As EventArgs)
  2.  
  3.         'Do something with Button
  4.  
  5.     End Sub

Thanks,