Skip to content

Instantly share code, notes, and snippets.

@Hribek25
Created August 8, 2018 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hribek25/16dc96a7fbb3749eb741e6e84a935679 to your computer and use it in GitHub Desktop.
Save Hribek25/16dc96a7fbb3749eb741e6e84a935679 to your computer and use it in GitHub Desktop.
BinaryFormatter.Deserialize
private object ByteArrayToObject(byte[] source)
{
using (var ms = new MemoryStream(source, false))
{
BinaryFormatter b = new BinaryFormatter();
return b.Deserialize(ms);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment