thanks Erel,
But then the problem remains. When using the RandomAccess class I need initialization (Initialize3) of a byte array to put the serialized object in (but I don't know what the size of the serielized object will be).
I have a work around by initializing a buffer of 64K bytes, do serialization and then reinitialize a new array with the correct size and copy the bytes into it (ByteConverter.ArrayCopy). Then I can use this second array to converted the byte array to a Base64 encoded string.
But I find the arraycopy etc kind of annoying (time consuming ?)
Thanks