// -- Blocks.
[XmlIgnore]
public Block[,] _Blocks{get;set;}
public byte[] _BlocksInStream
{
get
{
BinaryFormatter _Formater = new BinaryFormatter();
MemoryStream _Ms = new MemoryStream();
_Formater.Serialize(_Ms, _Blocks);
return _Ms.ToArray();
}
set
{
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.