Storages & Files Unit property
Unit Indexed, Read/Write property.

Gets/sets a value of the type specified from/to the position specified. An error will occur if the index is out of range. 


object.Unit(index,type) = value
variable =


index - numeric index of the byte in the memory buffer. 

type - a type constant that specifies the type (and implicitly the size) of the value to read/write.


This property allows you to access non-byte values directly in the buffer. Also automatic byte re-ordering will be performed as specified by the ByteOrder property.

The types supported are: byte (1-byte) , integer (2-bytes), long (4-bytes), float (4-bytes floating point), double (8-bytes floating point), Boolean, Currency, Date, char (signed byte), unsigned integer (2-bytes), unsigned long (4-bytes).

Applies to: SFBinaryData object

See also: ByteOrder property.

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later


newObjects Copyright 2001-2006 newObjects [ ]