Dirk,
If you have to get 17, 00, you can call the GetBytes method and then
pass the resulting array to the static Reverse method on the Array class.
This will flip the array around (in-place).
Are you working with sending something to a unix machine (or getting it
from a unix machine)? This is the only reason I can think of to use little
endian.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Dirk Reske" <_f*******@gmx.net> wrote in message
news:er**************@TK2MSFTNGP15.phx.gbl...
Hello,
I have:
ushort num = 0x0017;
how do I convert this to a byte array?
when I try BitConverter.GetBytes(num); I get {17,00}
I think I have to get {00,17}...
*** Sent via Developersdex http://www.developersdex.com ***