public static TypeLength GetTypeLength(byte tl) { TypeLength tlen = new TypeLength(); tlen.type = (TypeCode)((tl >> 6) & 0x03); tlen.length = tl & 0x3F; return(tlen); }
public static byte GetTypeLengthByte(TypeLength tl) { byte typePart = (byte)tl.type; return((byte)((byte)(typePart << 6) | (byte)tl.length)); }