Imports System
Public Class Program
Public Shared Sub Main()
Dim array2d As Integer(,) = {
{1, 2, 3, 6, 0},
{-5, -4, 0, 7, 9},
{1, 7, 100, 14, 6},
{9, 10, 11, 12, 13}}
Dim cols As Integer = array2d.GetUpperBound(1) + 1
Dim i As Integer = 1, j As Integer = 3
Dim index As Integer = i * cols + j
Console.WriteLine(index)
End Sub
End Class
' run:
'
' 8
'