taha khan | 10-12-2009 11:12 PM | Copying One Matrix into the other program Copying One Matrix into the other Code:
Module Matcopy Sub Main() Dim i, j As Integer Dim Matrix1 As Integer(,) = New Integer(,) {{1, 2, 3}, {4, 5, 6}} Dim Matrix2 As Integer(,) = New Integer(2, 3) {} For i = 0 To 1 For j = 0 To 2 Console.Write(Matrix1(i, j) & vbCrLf) Next Next For i = 0 To 1 For j = 0 To 2 Matrix2(i, j) = Matrix1(i, j) Next Next Console.WriteLine("The copied Matrix is as follows ") For i = 0 To 1 For j = 0 To 2 Console.Write(Matrix2(i, j) & vbCrLf) Next Next End Sub End Module
|