Add overloads to pass target value as out value.
Methods should be provided to pass in the target of the read value as a out
parameter, e.g.
stream.ReadInt32(out Int32 result);
This way, Read
can simply be replaced with Write
to create a serializing method from a deserializing one (or vice versa).
Edited by Ray