public override int decode(byte[] buffer, int offset) { int headerLength; byte asnType = ParseHeader(buffer, ref offset, out headerLength); if (asnType != Type) throw new SnmpException("Invalid ASN.1 type"); if (headerLength != 0) throw new SnmpDecodingException("Invalid ASN.1 length"); return offset; }