?
Dim bss As New Dictionary(Of String, BindingSource)
Dim ps() As String = {"p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11"}
For Each p As String In ps
bss.Add("BS_" & p, New BindingSource)
Next
For Each pair As KeyValuePair(Of String, BindingSource) In bss
' Display Key and Value.
Debug.Print("{0}, {1}", pair.Key, pair.Value)
Next
|