TBitConverter
FromBcd
FromByte
FromCurrency
FromDouble
FromExtended
FromInteger
FromLargeInt
FromLongBool
FromLongInt
FromLongWord
FromShortInt
FromSingle
FromSmallInt
FromSqlTimeStamp
FromSqlTimeStampOffset
FromVariant
FromWord
FromWordBool
TBitConverter provides two main class functions:
- From converts a value in a Delphi native type into an array of bytes.
- InTo converts an array of bytes into a Delphi native type.
Data.DB.TBitConverter.FromCurrency
FromCurrency From
class procedure FromCurrency(Value: Currency; Buffer: TArray<Byte>);
__classmethod void __fastcall FromCurrency(System::Currency Value, System::DynamicArray<System::Byte> Buffer);
>>>>>>>
Delphi
class procedure From<T>(const Value: T; var B: TArray<Byte>; Offset: Integer = 0); static;
C++
void __fastcall TBitConverter::From(const T Value, System::DynamicArray<System::Byte> &B, int Offset)
ToInteger InTo
Data.DB.TBitConverter.ToIntegerFrom RAD Studio API Documentation
Delphi
class function ToInteger(Value: TArray<Byte>): Integer;
C++
__classmethod int __fastcall ToInteger(System::DynamicArray<System::Byte> Value);
System.Types.TBitConverter.InTo From RAD Studio API Documentation
Delphi
class function InTo<T>(const B: TArray<Byte>; Offset: Integer = 0): T;
static;C++
__fastcall TBitConverter::InTo(const System::DynamicArray<System::Byte> B, int Offset)
<T>必须是明确的类型
Data := TBitConverter.InTo<double>(Buffer);