web 2.0

VB.NET & ArrayList.Contains()

VB.NET & ArrayList.Contains() - ArrayList.Contains() : Determines whether an element is in the ArrayList.

ShotDev Focus:
- VB.NET & ArrayList.Contains()

Example

AspNetArrayListContains.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")

IF objArrList.Contains("green") = True
Me.lblText.Text =  "[green] is a member"
Else
Me.lblText.Text =  "[green] not a member"
End IF

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

 VB.NET & ArrayList.Contains()
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

One Response to “VB.NET & ArrayList.Contains()”

  1. 3compression…

Leave a Reply

You must be logged in to post a comment.