[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Classes' (#rtl)

# TBinaryObjectWriter.WriteVariant

Write a variant to the stream

## Declaration

Source position: classesh.inc line 1532

`public procedure TBinaryObjectWriter.WriteVariant(`
`const VarValue: Variant`
`); override;`

## Description

WriteVariant is overridden by TBinaryObjectWriter to write a simple variant type to the stream. WriteVariant does not write arrays types or complex types. Only null, integer (ordinal) float and string types are written.

## Errors

If a non-supported type is written, then an EWriteError exception is.