public override void WriteData(FastBinaryWriter writer, Object additionalInfo) { base.WriteData(writer, additionalInfo); // Hint is no longer used. This line is left here for backward compatibility writer.WriteSafeString(null); writer.Write(ColumnPos); if (writer.WriteNullState(Value)) { switch (Column.FieldTypeId) { case RICustomDataFieldIdType.Decimal: writer.Write(Decimal.Parse(Value.ToString())); break; case RICustomDataFieldIdType.Integer: writer.Write(Int64.Parse(Value.ToString())); break; case RICustomDataFieldIdType.DateTime: writer.Write((DateTime)Value); break; case RICustomDataFieldIdType.Boolean: writer.Write((Boolean)Value); break; case RICustomDataFieldIdType.String: writer.Write(Value.ToString()); break; case RICustomDataFieldIdType.Object: writer.Write(Value.ToString()); break; case RICustomDataFieldIdType.Unknown: writer.Write(Value.ToString()); break; } } }