Skip to content

Instantly share code, notes, and snippets.

@jeevan-vj
Created December 19, 2018 03:41
Show Gist options
  • Save jeevan-vj/3c026eecc641d2e0ee234cb67f46b370 to your computer and use it in GitHub Desktop.
Save jeevan-vj/3c026eecc641d2e0ee234cb67f46b370 to your computer and use it in GitHub Desktop.
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