Array Upper Bound and Lower Bound : Array « Data Structure « VB.Net

VB.Net
1. 2D
2. Application
3. Class
4. Data Structure
5. Database ADO.net
6. Development
7. Event
8. File Directory
9. Generics
10. GUI
11. Language Basics
12. Network Remote
13. Thread
14. Windows System
15. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
VB.Net » Data Structure » ArrayScreenshots 
Array Upper Bound and Lower Bound
Array Upper Bound and Lower Bound

Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())

        Dim friends() As String = {"1""2""3","4""5"}

        Console.WriteLine("Upper bound: " & UBound(friends)"Array Demo")
        Console.WriteLine("Lower bound: " & LBound(friends)"Array Demo")

        Array.Sort(friends)

        Dim upperBound As Integer = friends.Length

        Dim random As New System.Random()

        Dim As Integer
        For n = To 10
            Dim index As Integer = random.Next(upperBound)
            Console.WriteLine(index & ": " & friends(index))
        Next
    End Sub
    

End Class

           
       
Related examples in the same category
1. Bounded array ExampleBounded array Example
2. For Each loops through ArrayFor Each loops through Array
3. Two ways to loop through ArrayTwo ways to loop through Array
4. A simple class to store in the array
5. Array UBoundArray UBound
6. Set Array Element Value by Index
7. Array IndexOf and LastIndexOfArray IndexOf and LastIndexOf
8. Use Array CreateInstance to Create ArrayUse Array CreateInstance to Create Array
9. Array Performance Test: One-dimensional arrayArray Performance Test: One-dimensional array
10. Free array's memory
11. Array Performance Test: SetValue(i, i)Array Performance Test: SetValue(i, i)
12. Declaring, allocating and initializing arraysDeclaring, allocating and initializing arrays
13. Use For Each/Next to find a minimum gradeUse For Each/Next to find a minimum grade
14. Reference an Element in an Array by IndexReference an Element in an Array by Index
15. Init an Array in DeclarationInit an Array in Declaration
16. Array Length PropertyArray Length Property
17. Declare an Array and reference its memberDeclare an Array and reference its member
18. Store your won Class in an ArrayStore your won Class in an Array
w___w___w___.__j___a_v__a2___s_._c___om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.