943,936 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 6747
  • C# RSS
May 13th, 2008
0

Convert double from Small Endian to Big Endian and vice versa

Expand Post »
How do I convert double datatype from small endian to big endian and vice versa in c#. Your help will be highly appreciated.

Regards,
Sidharth Shah
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sidharthrshah is offline Offline
3 posts
since Apr 2008
Jun 10th, 2008
0

Re: Convert double from Small Endian to Big Endian and vice versa

c# Syntax (Toggle Plain Text)
  1. public static byte[] GetBigEndianBytesFromDouble(double value)
  2. {
  3. byte[] b;
  4. b=BitConverter.GetBytes(value);
  5. if (BitConverter.IsLittleEndian)
  6. Array.Reverse(b);
  7. return b;
  8. }
Reputation Points: 10
Solved Threads: 0
Newbie Poster
robertwharvey is offline Offline
1 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: How to upload .doc file into SQLSERVER2005 in c# windows application
Next Thread in C# Forum Timeline: eb browser question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC