Visual Basic: [code]
Dim txtMaßArray() As TextBox
Dim txtEinArray() As TextBox
Private Function NeueSpalte(ByVal Anzahl As Integer)
For i As Integer = 1 To Anzahl
txtMaßArray(i) = New TextBox
With txtMaßArray(i)
.Parent = Me
.Parent.Controls.Add(txtMaßArray(i))
.Name = "txtMaß" & i
.Size = New Size(220, 20)
.Location = New Point(10, 10 + i * 2 * .Height)
.Visible = True
AddHandler .TextChanged, AddressOf txtMaßArray_TextChanged
End With
Next i
End Function[/code]
Der Name "txtMaßArray_TextChanged" wurde nicht deklariert