Click to See Complete Forum and Search --> : Assembling 32 bit value


zvenny
October 19th, 2007, 07:43 AM
I'm looking for a way to store a byte , sbyte and UInt16 in a 32 bit variable in a way that the hex representation looks like bytesbyteuInt16. e.g.
byte byVal=10; //16#0A
sbyte sbyVal=-1; //16#FF
UInt16 usVal=512 //16#0200;would then result in the following 32 bit variable 16#0AFF0200 !

Anyone ?

torrud
October 19th, 2007, 09:10 AM
Maybe the Conversion.Hex() method gives you a starting point.