Converts the data type to a TIdBytes value.
function ToBytes( const AValue: Short ): TIdBytes; overload;
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.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.