public override byte[] ToBsonByteArray()
{
//create the default size
DynamicStream stream = new DynamicStream(5);
//generate the bytes
stream.InsertAt(4, base.ToBsonByteArray());
//update the length
stream.WriteAt(0, BsonTranslator.AsInt32(stream.Length));
//and return the bytes to use
return stream.ToArray();
}