예제 #1
0
        public static TypeLength GetTypeLength(byte tl)
        {
            TypeLength tlen = new TypeLength();

            tlen.type   = (TypeCode)((tl >> 6) & 0x03);
            tlen.length = tl & 0x3F;

            return(tlen);
        }
예제 #2
0
        public static byte GetTypeLengthByte(TypeLength tl)
        {
            byte typePart = (byte)tl.type;

            return((byte)((byte)(typePart << 6) | (byte)tl.length));
        }