PowerSNMP for .NET
ToString(String) Method




A pattern indicating how the value should be displayed.
Returns a string formatted using the supplied display-hint.
Syntax
Public Overloads Function ToString( _
   ByVal displayHint As String _
) As String
Dim instance As OctetString
Dim displayHint As String
Dim value As String
 
value = instance.ToString(displayHint)
public string ToString( 
   string displayHint
)
public: string* ToString( 
   string* displayHint
) 
public:
String^ ToString( 
   String^ displayHint
) 

Parameters

displayHint
A pattern indicating how the value should be displayed.

Return Value

A formatted string representation of the value.
Remarks

The displayHint consists of any number of "octet-specifications" which contain five parts:

  1. An optional repeat indicator ('*') which indicates how many times this octet-spec should be applied.
  2. A length indicating how many bytes to read.
  3. A format indicating how the bytes should be formatted.
  4. An optional separator character to append to the end of the octet-spec.
  5. An optional repeat terminator character to append after all repeats of the octet-spec.
The formatted value cannot end with a separator or a repeat terminator. If the end if the display-hint is reached without formatted the entire value, the last octet spec is applied as many times as necessary.

Here are some examples:

Encoded Value Display Hint Result
160 20 243 123 1x: a0:14:f3:7b
20 10 9 3 11 45 32 8 43 2 30 2d-1d-1d,1d:1d:1d.1d,1a1d:1d 2010-9-3,11:45:32.8,+2:30
02 97 97 97 97 05 98 98 98 98 98 03 99 99 122 122 99 99 100 100 *2a:!*1a.$*2a-%1a aa:aa!b.b.b.b.b$cc-zz-cc%dd
See Also

Reference

OctetString Class
OctetString Members
Overload List


PowerSNMP for .NET Documentation Version 8.0
© 2024 Dart Communications. All Rights Reserved.
Send comments on this topic