System.Int64 paraInt64 = 4294967295; System.Byte[] myByte = new System.Byte[4]; myByte[0] = Convert.ToByte(paraInt64/(256*256*256)); if (paraInt64/(256*256) <= 255) myByte[1] = Convert.ToByte(paraInt64/(256*256)); else myByte[1] = Convert.ToByte((paraInt64/(256*256))%256); if (paraInt64/(256) <= 255) myByte[2] = Convert.ToByte(paraInt64/256); else myByte[2] = Convert.ToByte((paraInt64/256)%256); myByte[3] = Convert.ToByte(paraInt64%256); System.Int64 iValue; iValue = (Convert.ToInt64(myByte[0]) * (256*256*256)) + (Convert.ToInt64(myByte[1]) * (256*256)) + (Convert.ToInt64(myByte[2]) * 256) + (Convert.ToInt64(myByte[3]));Einar
>System.Int32 iValue = 42000; >System.Byte[] bValue = new System.Byte[2]; > >bValue[0] = Convert.ToByte(iValue/256); >bValue[1] = Convert.ToByte(iValue%256); > >System.Int32 iRetVal; >iRetVal = Convert.ToInt32(Convert.ToInt32(bValue[0]) * 256 + Convert.ToInt32(bValue[1])); >>