How to compare two byte arrays in VB.NET

1 Answer

0 votes
Imports System
Imports System.Linq

Public Class Program
	Public Shared Sub Main()
        Dim arr1 = New Byte() {1, 2, 3, 4}
        Dim arr2 = New Byte() {1, 2, 3, 4}
		
        Dim result = arr1.SequenceEqual(arr2)
		
        Console.Write(result)
    End Sub
End Class




' run:
'
' True
'

 



answered Jun 5, 2023 by avibootz
...