VB.NET-INFORMATIONS.COM


Home  

VB.NET Collections Tutorials

How to VB.Net Dyanamic Array

Vb.Net Help      Crystal Reports      Excel


Dynamic Arrays can resize the capability of the Array at runtime .when you are in a situation that you do not know exactly the number of elements to store in array while you making the program. In that situations we are using Dynamic Array .

Initial declaration

Dim scores() As Integer

Resizing

ReDim scores(1)

If you want to keep the existing items in the Array , you can use the keyword Preserve .

ReDim Preserve scores(2)

In this case the Array dynamically allocate one more String value and keep the existing values.

VB.NET SourceCode

When you execute this source code , the first loop shows first two values stored in the Array. Next loop shows the whole value stored in the Array.

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 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