VB.NET-INFORMATIONS.COM


Home  

VB.NET Collections Tutorials

How to VB.Net Arrays

Vb.Net Help      Crystal Reports      Excel


Arrays are using for store similar data types grouping as a single unit. We can access Array elements by its numeric index.

Dim week(6) As String

The above Vb.Net statements means that , an Array named as week declared as a String type and it can have the capability of seven String type values.

week(0) = "Sunday"

week(1) = "Monday"

In the above statement , we initialize the values to the String Array. week(0) = "Sunday" means , we initialize the first value of Array as "Sunday" ,

Dim weekName as String = week(1)

We can access the Arrays elements by providing its numerical index, the above statement we access the second value from the week Array.

In the following program , we declare an Array "week" capability of seven String values and assigns the seven values as days in a week . Next step is to retrieve the elements of the Array using a For loop. For finding the end of an Array we used the Length function of Array Object.

VB.NET SourceCode

When you execute this program you will get the Days in a Week .

VB.NET Collections Related Contents
How to use VB.NET ArrayList
How to use VB.NET HashTable
How to use VB.NET Stack
How to use VB.NET Queue
How to use VB.NET Dyanamic Arrays
How to use VB.NET NameValueCollection

VB.NET Related Tpoics
Microsoft .Net Framework Tutorials
VB.NET Language Basics Tutorials
VB.NET Program Flow Control Tutorials
VB.NET Collections Tutorials
VB.NET String Tutorials
VB.NET Files Tutorials
VB.NET Excel 2007 Tutorials
VB.NET Crystal Reports Tutorials
VB.NET Communications Tutorial

Search here for more Vb.Net Source Code :



    Categories

    HOME
    VB.NET

 
 
 
   













  |  Home   |  SiteMap   |  About   |
net-informations.com (C) 2008 All Rights Reserved