コード例 #1
0
        public override byte[] ConvertToBytes(object obj)
        {
            UInt32 n = Convert.ToUInt32(obj);

            byte[] bs = BitConverter.GetBytes(n);
            return(BytesOrderAdjustor.AdjustWordOrder(bs, true, true, this.IsLowWordFirst, this.IsLowByteFirst));
        }
コード例 #2
0
 public override object ConvertToObject(byte[] bytes)
 {
     byte[] bs = BytesOrderAdjustor.AdjustWordOrder(bytes, this.IsLowWordFirst, this.IsLowByteFirst,
                                                    true, true);
     return(BitConverter.ToUInt32(bs, 0));
 }