I am working with a database from a legacy app which stores 24 floating point values (doubles) as a byte array of length 192, so 8 bytes per value. This byte array is stored in a column of type image in a SQL Server 2005 database.
In my .net app I need to read this byte array and convert it to a array of type Double[24]. I can access the field easy enough reader.GetBytes(...) but how to convert the returned ByteArray to Double[24]
Any ideas?
Thanks,
AJ
Well, how is each set of 8 bytes represented? You may be able to use
Buffer.BlockCopy:or you may need to use
BitConverter.ToDoublerepeatedly – or some custom conversion method.