PowerSNMP for .NET
Variable Constructor(MibNode,String)




MibNode providing a definition for the Variable.
A string representation of the value.
Creates a scalar Variable with a value.
Syntax
Public Function New( _
   ByVal definition As MibNode, _
   ByVal value As String _
)
Dim definition As MibNode
Dim value As String
 
Dim instance As New Variable(definition, value)
public Variable( 
   MibNode definition,
   string value
)
public: Variable( 
   MibNode* definition,
   string* value
)
public:
Variable( 
   MibNode^ definition,
   String^ value
)

Parameters

definition
MibNode providing a definition for the Variable.
value
A string representation of the value.
Exceptions
ExceptionDescription
System.ArgumentExceptionThrown if definition is not a scalar object. MibNode.Usage must be Usage.Object.
System.ArgumentExceptionThrown if definition does not have a valid ValueType property value.
Remarks

Used to populate the variables collection of SetMessage, InformMessage, Trap1Message or Trap2Message, and for populating Agent.Variables. Use Variable Constructor(MibNode,String,String) to build non-scalar table values.

value will be automatically converted into the relevant SimpleType as defined by definition.ValueType, populating Value. Definition will be populated with definition. definition.Oid + ".0" is used to initialize Id.

See Also

Reference

Variable Class
Variable Members
Overload List

6.1.1.2
PowerSNMP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic