VB.NET & ArrayList.AddRange() - ArrayList.AddRange() : Adds the elements of an ICollection to the end of the ArrayList.
ShotDev Focus:
- VB.NET & ArrayList.AddRange()
Example
AspNetArrayListAddRange.aspx
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim objArrList As ArrayList
Dim i As Integer
objArrList = New ArrayList
objArrList.Add("white")
objArrList.Add("black")
objArrList.Add("red")
objArrList.Add("yellow")
objArrList.Add("green")
'*** ArrayList 2 ***'
Dim objArrList2 As New ArrayList
objArrList2.Add("blue")
objArrList2.Add("pink")
'*******************'
objArrList.AddRange(objArrList2)
For i = 0 To objArrList.Count - 1
Me.lblText.Text = Me.lblText.Text & objArrList(i) & "<br>"
Next
End Sub
</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label id="lblText" runat="server"></asp:Label>
</form>
</body>
</html>
Screenshot


1harassment…
…