How to Convert double to bytes?

  • Thread starter Thread starter =?big5?B?qM6nuw==?=
  • Start date Start date
?

=?big5?B?qM6nuw==?=

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[]={ ?, ?, ?, ?, ?, ?, ?, ?}

Thanks.
 
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[]={ ?, ?, ?, ?, ?, ?, ?, ?}

Thanks.

byte[] buffer;
buffer=BitConverter.GetBytes( a );
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top