Topic Path: Symbol Reference > Functions > ToBytes Function (Byte)
ContentsIndexHome
PreviousUpNext
ToBytes Function

Converts the data type to a TIdBytes value.

File
function ToBytes(
    const AValue: Byte
): TIdBytes; overload;
Parameters 
Description 
AValue 
Value to be converted to TIdBytes

TIdBytes - Results of the data type conversion.

ToBytes is an overloaded TIdBytes function used to convert the data type in AValue to the return value for the function. 

For the .Net platform, the System.BitConverter.GetBytes method from the framework is used to store the converted values. 

For all other platforms, the Move procedure from the runtime library is used to store the converted values. 

ToBytes is a utility function used internally in the Indy library, and isolates the platform-specific requirements for working with Delphi string and .Net array of Byte data types.

TIdIOHandler.WriteBytes 

TIdBuffer.ExtractToBytes

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.