I can't convert it correctly by Convert class.
for example:
I got a bufferStream, and
byte[] a = {0,0,0,0,0,10,1,23}
I want to convert a to double b. How should I do? 3 14046
佳宏 wrote:
I can't convert it correctly by Convert class.
for example:
I got a bufferStream, and
byte[] a = {0,0,0,0,0,10,1,23}
I want to convert a to double b. How should I do?
BitConverter.ToDouble maybe.
Arne
=?big5?B?qM6nuw==?= <ts******@gmail.comwrote:
I can't convert it correctly by Convert class.
for example:
I got a bufferStream, and
byte[] a = {0,0,0,0,0,10,1,23}
I want to convert a to double b. How should I do?
Well, how was it encoded in the first place? We can't possibly answer
without knowing what the format is meant to be.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
On 8 6 , 5 31 , Arne Vajhj <a...@vajhoej.dkwrote:
wrote:
I can't convert it correctly by Convert class.
for example:
I got a bufferStream, and
byte[] a = {0,0,0,0,0,10,1,23}
I want to convert a to double b. How should I do?
BitConverter.ToDouble maybe.
Arne
Thank you Arne, you method can work~ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hunterb |
last post by:
I have a file which has no BOM and contains mostly single byte chars. There
are numerous double byte chars (Japanese) which appear throughout. I need to
take the resulting Unicode and store it in a...
|
by: jose luis fernandez diaz |
last post by:
Hi,
The program below prints a unsigned short in binary base:
#include <iostream>
int main() {
unsigned short mask =0x1;
unsigned short us =0x0071;
|
by: DanSteph |
last post by:
hello all,
I have a problem, I have a DOUBLE value like that
4065 4000 0000 0000
and I want to convert it to a DWORD like that:
4065 4000
if I do result=(DWORD)MyDouble it end with...
|
by: Khuong Dinh Pham |
last post by:
I have the contents of an image of type std::string. How can I make a
CxImage object with this type.
The parameters to CxImage is:
CxImage(byte* data, DWORD size)
Thx in advance
|
by: kevinniu |
last post by:
Hi everyone,
In c#, what is the fastest way(include unsafe) to
convert a array of bytes(which really contains the
bytes of a double array) to a arry of double.
thanks
|
by: antonio matos |
last post by:
hi people.
I have to acess a database, and there are some fields that
are binary. when i acess that field is read like an array
of bytes.
but in reality it's an array of doubles!!!
how can...
|
by: David Scemama |
last post by:
Hi,
I'm writing a program using VB.NET that needs to communicate with a DOS
Pascal program than cannot be modified. The communication channel is through
some file databases, and I have a huge...
|
by: Nikolay Petrov |
last post by:
How can I convert DOS cyrillic text to Unicode
|
by: yekasi |
last post by:
Hi,
I have this number, 1.5283632704970307 in char*, and I need to convert
it to a double type in C++ that is capable of storing that number of
precisions.... I tried doing atof and storing it...
|
by: =?big5?B?qM6nuw==?= |
last post by:
I already knew how to convert bytes to Double, use
BitConverter.ToDouble().
but,
How to convert double to bytes?
for example:
double a = 3,444;
I want convert to bytes={ ?, ?, ?, ?, ?, ?,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |