Click here to Skip to main content
12,505,881 members (48,322 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
// -- Blocks.
public Block[,] _Blocks{get;set;}

public byte[] _BlocksInStream
BinaryFormatter _Formater = new BinaryFormatter();
MemoryStream _Ms = new MemoryStream();
_Formater.Serialize(_Ms, _Blocks);
return _Ms.ToArray();

BinaryFormatter _Formatter = new BinaryFormatter();
byte[] _Array = value;
_Blocks = (Block[,])_Formatter.Deserialize(new MemoryStream(_Array));

This does not seem to work, well, the serialziation work, but I get a null back.
Also, I read this out using the XML Serializer.
Posted 25-Dec-12 11:35am
Yvar Birx2.4K

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 25 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100