By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,735 Members | 1,419 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,735 IT Pros & Developers. It's quick & easy.

How to Convert double to bytes?

P: n/a
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.

Aug 11 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Aug 12, 12:22 am, <tsjer...@gmail.comwrote:
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 );

Aug 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.