PowerSNMP for .NET CF
Version Property
See Also  Send comments on this topic.
Dart.Snmp Namespace > MessageBase Class : Version Property




Gets or sets the SNMP version used for encoding.

Syntax

Visual Basic (Declaration) 
Public Property Version As SnmpVersion
Visual Basic (Usage)Copy Code
Dim instance As MessageBase
Dim value As SnmpVersion
 
instance.Version = value
 
value = instance.Version
C# 
public SnmpVersion Version {get; set;}
Managed Extensions for C++ 
public: __property SnmpVersion get_Version();
public: __property void set_Version( 
   SnmpVersion value
);
C++/CLI 
public:
property SnmpVersion Version {
   SnmpVersion get();
   void set (    SnmpVersion value);
}

Property Value

This value is initialized when a message is decoded. The application can set this property to indicate the SNMP version to be used for encoding.

Exceptions

ExceptionDescription
System.ArgumentExceptionAn invalid version is being specified for the message.

Remarks

Messages of type TrapMessage can only be set to SnmpVersion.One.

Messages of type InformMessage, GetBulkMessage, ReportMessage and NotificationMessage can only be set to SnmpVersion.Two or SnmpVersion.Three.

Messages of type ResponseMessage, SetMessage, GetMessage and GetNextMessage can be set to any value.

If set to SnmpVersion.Three then StandardMessage.Security should be initialized to the security values needed to control the authentication and encryption process while encoding. When decoding SnmpVersion.Three packets the Agent and Manager get their passwords from the Users property.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.