Click here to Skip to main content
11,429,154 members (54,359 online)
Rate this: bad
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 12:35pm
Yvar Birx2.4K

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

Advertise | Privacy | Mobile
Web03 | 2.8.150428.2 | Last Updated 25 Dec 2012
Copyright © CodeProject, 1999-2015
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