private void WriteScalar(BinaryWriter writer, ScalarElement scalar) { writer.Write(scalar.GetValue()); }