web 2.0

VB.NET & LBound()

VB.NET & LBound() - LBound() : Returns the smallest available subscript for the indicated dimension of an array.

ShotDev Focus:
- VB.NET & LBound()

Example

LBound.aspx

<%@ Page Language="VB" %>
<script runat="server">

Sub Page_Load(sender As Object, e As EventArgs)

Dim i,arrVar(4,1)
arrVar(0,0) = 1
arrVar(0,1) = 1.1
arrVar(1,0) = 2
arrVar(1,1) = 2.2
arrVar(2,0) = 3
arrVar(2,1) = 3.3
arrVar(3,0) = 4
arrVar(3,1) = 4.4
arrVar(4,0) = 5
arrVar(4,1) = 5.5

For i = LBound(arrVar) To UBound(arrVar)
lblText1.Text = lblText1.Text &  arrVar(i,0)&" - "&arrVar(i,1)&"<br>"
Next

End Sub
</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<asp:Label id="lblText1" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

VB.NET & LBound()
.
.
.
Download this script.
Download

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

Leave a Reply

You must be logged in to post a comment.