.NET Framework Class Library
BerConverter..::.Decode Method

The Decode method decodes a binary representation of the data, using BER, to retrieve structured data.

Namespace:  System.DirectoryServices.Protocols
Assembly:  System.DirectoryServices.Protocols (in System.DirectoryServices.Protocols.dll)
Syntax

Visual Basic (Declaration)
Public Shared Function Decode ( _
    format As String, _
    value As Byte() _
) As Object()
Visual Basic (Usage)
Dim format As String
Dim value As Byte()
Dim returnValue As Object()

returnValue = BerConverter.Decode(format, _
    value)
C#
public static Object[] Decode(
    string format,
    byte[] value
)
Visual C++
public:
static array<Object^>^ Decode(
    String^ format, 
    array<unsigned char>^ value
)
JScript
public static function Decode(
    format : String, 
    value : byte[]
) : Object[]

Parameters

format
Type: System..::.String
The format string.
value
Type: array<System..::.Byte>[]()[]
An array of BER data.

Return Value

Type: array<System..::.Object>[]()[]
The decoded data.
Exceptions

ExceptionCondition
ArgumentNullException

The format parameter contains a null reference (Nothing in Visual Basic).

ArgumentException

The format parameter contains an undefined character.

BerConversionException

The underlying decoding fails. The decoding rules include the following.

CodeCorresponding Result
'{' '}' '[' ']' 'n' 'x'No corresponding result
'i' 'e'int
'b'bool
'a'string
'O'byte[]
'B'byte[] containing bit strings
'v'string[]
'V'byte[][]
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Tags :


Page view tracker