Encode SNMP packet for sending.

Namespace:  SnmpSharpNet
Assembly:  SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.2.0 (0.5.2.0)

Syntax

C#
public override byte[] encode()
Visual Basic (Declaration)
Public Overrides Function encode As Byte()
Visual C++
public:
virtual array<unsigned char>^ encode() override

Return Value

BER encoded SNMP packet.

Exceptions

ExceptionCondition
SnmpInvalidPduTypeExceptionThrown when PDU being encoded is not a valid SNMP version 1 PDU. Acceptable protocol version 1 operations are GET, GET-NEXT, SET and RESPONSE.

See Also