Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
// -- 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.

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900