Created
December 19, 2018 03:41
-
-
Save jeevan-vj/3c026eecc641d2e0ee234cb67f46b370 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static bool CompareMemoryStreams(MemoryStream ms1, MemoryStream ms2) | |
{ | |
if (ms1.Length != ms2.Length) | |
return false; | |
ms1.Position = 0; | |
ms2.Position = 0; | |
var msArray1 = ms1.ToArray(); | |
var msArray2 = ms2.ToArray(); | |
return msArray1.SequenceEqual(msArray2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment