VB.net learning Summary 5 (array)

Source: Internet
Author: User

The base class of the VB.net array is system. array.

Anyone who has learned programming will have a certain understanding of arrays. After all, any computer development language will have the concept of arrays. An array is an object that stores a set of numbers. Important Concepts in arrays include:

Dimension (also called rank-only) rank
Length of each dimension: getlength, getlonglength
Getlowerbound, getupperbound
Total length, longlength
Traverse find, exists, indexof, etc.
Sort
Reverse reverse
Dynamic Array redim, resize but Resize is a generic Method
Copy, copyto, and constrainedcopy of Arrays

System. array provides a wide range of attributes and methods. We can refer to msdn for more useful information.

Arrays can theoretically store a group of any type of objects. Therefore, Arrays can certainly be stored in arrays, and these arrays can be of different dimensions and lengths. In this way, we can use arrays to store irregular array information. The example is as follows:

Dim ARRA (1) as array
Dim arrb (2) as string
Arrb (0) = "northsnow"
Arrb (1) = "snow in Sebei"
Arrb (2) = "Changchun Railway Passenger Car Co., Ltd"
Dim ARRC (1) as string
ARRC (0) = "csdn"
ARRC (1) = "China's largest developer network"
ARRA (0) = arrb
ARRA (1) = ARRC
For I = 0 to ARRA. getupperbound (0)
For J = 0 to ARRA (I). getupperbound (0)
Msgbox (ARRA (I). getvalue (j ))
Next
Next

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.