VB.net program to create a 1-D rectangular array of Tuple

Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 214
'Creating an array of capacity 10
Dim int1DArray As Tuple(Of Integer)() = New Tuple(Of Integer)(9) {}

'Pushing data to the 1D Rectangular Array
Dim i As Integer = 10
While System.Math.Max(System.Threading.Interlocked.Decrement(i),i + 1) > 0
int1DArray(i) = Tuple.Create(10 * i)
End While

First we have created a 1D array of Tuple whose capacity is 10. We can figure out that we are not using the () for instantiating it. Once the Tuple is created, we have pushed some values to the Tuple-Array by using the "goes to" operator. Finally we are reading the data from the Tuple-Array by using the "is approached by" operator.

Comments or Responses

Login to post response