VB.net program to create and access a 1D jagged array which contains four 2D array elements with Tuples

Rajnilari2015
Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 392
'Example of Jagged Array and 2D Rectangular Array of Tuples
Dim sampleJaggedArrayWith2DRectangularArray As Integer()(,) = New Integer(3)(,) {New Integer(,) {{1, 2}, {3, 4}}, New Integer(,) {{5, 6}, {7, 8}, {9, 10}, {11, 12}}, New Integer(,) {{14, 15}, {16, 17}, {18, 19}, {20, 21}}, New Integer(,) {{22, 23}, {24, 25}, {26, 27}, {28, 30}}}

'create an tuple of Jagged Array and 2D Rectangular Array
Dim jaggedArrayWith2DRectangularArrayTuple = Tuple.Create(sampleJaggedArrayWith2DRectangularArray)

'access the tuple of Jagged Array and 2D Rectangular Array created

'element of 2nd row 3rd column 2nd Element [ 10 ]
Dim elementOf2ndRow3rdColumn = jaggedArrayWith2DRectangularArrayTuple.Item1(1)(2, 1)

Comments or Responses

Login to post response