KySoto

CollectionsTest

Feb 15th, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.59 KB | None | 0 0
  1. Public Class Form1
  2.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  3.         Me.TextBox4.Text = ""
  4.         Dim c As Control
  5.         Dim i As Integer
  6.         For Each c In Me.Controls
  7.             If c.GetType.Name.Equals("TextBox") Then
  8.                 Me.TextBox4.Text = TextBox4.Text & c.Name & " " & c.GetType.Name & vbCrLf
  9.             End If
  10.         Next
  11.         For i = 1 To Me.Controls.Count - 1 Step 1
  12.             Me.TextBox4.Text = TextBox4.Text & Me.Controls.Item(Me.Controls.IndexOfKey("textbox" & i)).Text
  13.         Next
  14.     End Sub
  15. End Class
Advertisement
Add Comment
Please, Sign In to add comment