About 7,310,000 results
Open links in new tab
  1. vb.net - declaring two-dimensional array - Stack Overflow

    Sep 30, 2014 · 2-dimensional array is correct. First index is column, second index is row. ReDim strData(intColumnCount - 1, intRowCount - 1) 'subtract 1 because array indices are 0-based. Column 0 = Range start, Column 1 = Range End, Column 2 = Grade.

  2. displaying a 2d array as rows and columns in visual basic console

    Nov 10, 2014 · I'm trying to display the below 2d array as rows and columns. Module Module1 Sub Main() 'declaring and initializing a 2d array Dim a1(,) As Integer = {{2, 3}, {5, 3}} ...

  3. VB.NET - 2D Array Examples - Dot Net Perls

    Nov 29, 2023 · With a two-dimensional array, we store a rectangular collection of elements. Step 1 This program populates a new 2D array. The "," syntax is used to declare the array as a two-dimensional array. Step 2 We call GetUpperBound—this returns how many elements are in a dimension (bound) of the array.

  4. Create a VB.NET Array with two columns of values?

    Apr 11, 2011 · I know how to set up an array with one column - but can it have two columns? e.g. I can do Dim my_array as array ("hello", "goodbye", "adios") easily, but how would I do it with two columns, e.g. Dim my_array as array ("hello" "1", "goodbye" "4", "adios" "0")?

  5. Lesson 16 : Arrays - Visual Basic Tutorial

    Feb 14, 2025 · A two-dimensional array is a table of items that make up of rows and columns. The format for a one-dimensional array is ArrayName(x), the format for a two dimensional array is ArrayName(x,y) and a three-dimensional array is ArrayName(x,y,z) .

  6. Using arrays (VBA) | Microsoft Learn

    Jan 21, 2022 · In Visual Basic, you can declare arrays with up to 60 dimensions. For example, the following statement declares a 2-dimensional, 5-by-10 array. If you think of the array as a matrix, the first argument represents the rows and the second argument represents the columns. Use nested For...Next statements to process multidimensional arrays.

  7. Multidimensional Arrays - Visual Basic Tutorial

    This Visual Basic tutorial teaches you how to create and iterate through 2D and 3D arrays in Visual Basic.

  8. VB.Net program to read and print the matrix using a two-dimensional array

    Nov 16, 2024 · Read and print the matrix using a 2D array. Here, we will read a 2X3 matrix from the user then print the input matrix on the console screen. Program/Source Code: The source code to read and print the matrix using a two-dimensional array is given below. The given program is compiled and executed successfully.

  9. VB.NET 2D, 3D and Jagged Array Examples - The Developer Blog

    Two-dimensional. 2D arrays have complex syntax. We have data that should be stored in rows and columns. With a two-dimensional array, we store a rectangular collection of elements. Here: This program populates a new 2D array. The (,) syntax is used to declare the array as a two-dimensional array.

  10. vb.net - Initializing 2D Array - Stack Overflow

    Oct 9, 2015 · Well, this is not how you access read/write data to a 2D array. It looks more like that: Sub Main() ' an array with 5 rows and 2 columns. Dim a(,) As Integer = {{0, 0}, {1, 2}, {2, 4}, {3, 6}, {4, 8}} Dim i, j As Integer. ' output each array element's value ' For i = 0 To 4. For j = 0 To 1. Console.WriteLine("a[{0},{1}] = {2}", i, j, a(i, j))

  11. Some results have been removed
Refresh