title: Binary Serialization of an Array of DateTime
body: <p>When I serialize an array of Int32 using the BinaryFormatter, I get about 400MB/s (100 million items in one second), but when I try to serialize an array of DateTime, I get only a throughput of about 27MB/s (100 million items in 30 seconds). One DateTime occupies eight bytes in serialized form. I guess that the BinaryFormatter uses the ISerializable interface, if its implemented, so I had a look at the GetObjectData implementation of the DateTime type:</p>
  
  <pre><code>void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
  {
      if (info == null)
      {
          throw new ArgumentNullException("info");
      }
      info.AddValue("ticks", this.InternalTicks);
      info.AddValue("dateData", this.dateData);
  }
  </code></pre>
  
  <p>I am confused that an UInt64 and an Int64 are added to the output, which should be 16 bytes in sum, but that does not reflect my measures. So how is DateTime really serialized to binary?</p>