BitsetsNET.ArrayContainer.Serialize C# (CSharp) Method

Serialize() public method

Serialize this container in a binary format.
The serialization format is first the cardinality of the container as a 32-bit integer, followed by an array of the indices in this container as 16-bit integers.
public Serialize ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter The writer to which to serialize this container.
return void
        public override void Serialize(BinaryWriter writer)
        {
            writer.Write(Cardinality);
            for (int i = 0; i < Cardinality; i++)
            {
                writer.Write(Content[i]);
            }
        }