Seclare a 4x3 Integer array : Array Multi Dimension « Data Structure « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Data Structure » Array Multi DimensionScreenshots 
Seclare a 4x3 Integer array
Seclare a 4x3 Integer array
 
Imports System

Public Class MainClass
    
    Shared Sub Main()
             Const rowsUB As Integer = 4
             Const columnsUB As Integer = 3

             Dim rectangularArray(rowsUB, columnsUBAs Integer

             'populate the array
             Dim As Integer
             For i = To rowsUB - 1
                 Dim As Integer
                 For j = To columnsUB - 1
                     rectangularArray(i, j= i + j
                 Next j
             Next i

             'report the contents of the array
             For i = To rowsUB - 1
                 Dim As Integer
                 For j = To columnsUB - 1
                     Console.WriteLine_
                       "rectangularArray[{0},{1}] = {2}", _
                       i, j, rectangularArray(i, j))
                 Next j
             Next i

    End Sub

End Class


           
         
  
Related examples in the same category
1.Initializing a jagged array, one in which the length of each array differsInitializing a jagged array, one in which the length of each array differs
2.Define and initialize the multi-dimensional arrayDefine and initialize the multi-dimensional array
3.Array Performance Test: Two-dimensional arrayArray Performance Test: Two-dimensional array
4.Array Performance Test: Two-dimensional Array and SetValue(i, i)Array Performance Test: Two-dimensional Array and SetValue(i, i)
5.Two Dimensional Rectangle ArrayTwo Dimensional Rectangle Array
6.Define and Init two dimensional arrayDefine and Init two dimensional array
7.Initializing multidimensional arrays: rectangular two-dimensional arrayInitializing multidimensional arrays: rectangular two-dimensional array
8.Jagged two-dimensional arrayJagged two-dimensional array
9.Two dimension array DemoTwo dimension array Demo
10.Array.SetValue for two-dimensional array
11.Array.SetValue for three-dimensional array
12.Array.SetValue for a seven-dimensional array
13.Clear multi-dimensional array
w_w_w_.__ja_v___a___2_s__.__co___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.