Scalabium Software |
|
Knowledge for your independence'. | |
Home Delphi and C++Builder tips |
#4: read the number from buffer |
|
1. read from stream: byte[] arrData = {0, 0, 0, 0, 0, 0, 0xF0, 0xBF}; Double dbl; MemoryStream ms = new MemoryStream(); ms.Write(arrData, 0, 8); ms.Position = 0; BinaryReader br = new BinaryReader(ms); dbl = br.ReadDouble(); 2. copy/convert from buffer: dbl = BitConverter.ToDouble(arrData, 0);
|
|
Copyright© 1998-2024, Scalabium
Software. All rights reserved. |