Mega Code Archive

 
Categories / ASP.Net Tutorial / Collections
 

Foreach loop (VB)

<%@ Page %> <script language="vb" runat="server">   Sub Page_Load(sender As Object, e As EventArgs)     Dim i As Integer     Dim item As String     Dim myList As New System.Collections.ArrayList()     myList.Add("Zero")     myList.Add("One")     myList.Add("Two")     myList.Add("Three")     myList.Add("Four")     myList.Add("Five")     For Each item In myList       Response.Write(Item & "<BR>")     Next   End Sub </script> <html>   <body>     <form id="form1" method="post" runat="server">     </form>   </body> </html>