Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
BerConverter Class
 Decode Method
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
BerConverter..::.Decode Method

Updated: November 2007

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)

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
)
J#
public static Object[] Decode(
    String format,
    byte[] 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.

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.

Code

Corresponding Result

'{' '}' '[' ']' 'n' 'x'

No corresponding result

'i' 'e'

int

'b'

bool

'a'

string

'O'

byte[]

'B'

byte[] containing bit strings

'v'

string[]

'V'

byte[][]

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, 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.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker