Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Reply
checking equality of multi-dimensional arrays
Duane
Jul 10 2012 7:29 PM
1.5k
Reply
Would the following code be the correct way to check for equality between 2 multidimensional arrays?
rivate Function AreArraysEqual(Of T)(ByVal a(,) As T, ByVal b(,) As T) As Boolean
If a Is Nothing AndAlso b Is Nothing Then
Return False
End If
If a Is Nothing Or b Is Nothing Then
Return False
End If
For i As Integer = 0 To a.GetUpperBound(0)
For j As Integer = 0 To a.GetUpperBound(1)
If Not a(i, j).Equals(b(i, j)) Then
Return False
End If
Next
Next
Return True
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
split list into multiple lists in vb.net
vb.net 2010 streamwriter