Visual Basic.net - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Visual Basic.net

Description:

An example of a string array named. strName. strName(0) ... Drew Barrymore. Casey Weldon. John Wayne. Sam Neil. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. srtName(0 to 9) ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 9
Provided by: tonyr8
Category:
Tags: barrymore | basic | drew | net | visual

less

Transcript and Presenter's Notes

Title: Visual Basic.net


1
Visual Basic.net
  • Arrays

2
Single Dimension Array
  • An array is a series of individual
  • variables, all referenced by the same
  • name
  • Sometimes arrays are referred to as
  • tables or subscripted variables

3
Array Elements
  • An example of a string array named
  • strName
  • strName(0) strName(1) strName(2)
  • note each individual variable is known as an
    element of the array

4
Declaring an array (Syntax)
  • Dim ArrayName(LowerSubscript to UpperSubscript)
    As DataType
  • Dim strName(0 to 9) as String 10 element array
  • Dim curBalance(10) as Currency 10 element
    array
  • Dim gstrProduct(1 to 100) as String 100
    element array
  • These are some examples of arrays declaration

5
String Array (example)
srtName(0 to 9)
0
1
2
3
4
5
6
7
8
9
6
Multiple Dimension Array
  • Used to store two subscripts that
  • Identifies tabular data, where data is
  • arranged in rows and columns
  • Examples
  • Insurance rate tables, tax tables,
  • postage rates, etc.

7
Multidimensional Array (Syntax)
  • Dim ArrayName (LowerLimit To UpperLimit,
    LowrrLimit To UpperLimit) As Datatype
  • Example
  • Dim strName(2, 3) As String
  • Dim strName(0 to 2, 0 to 3) as String
  • Both of these statements establishes an
  • array of 12 elements

8
Multidimensional Array (Example)
strName(0 to 2, 0 to 3)
Write a Comment
User Comments (0)
About PowerShow.com