Extracts the individual naming elements from a distinguished name component. The component can contain escaped characters.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in microsoft.metadirectoryservicesex.dll)

Usage

Visual Basic
Dim instance As ManagementAgent
Dim component As String
Dim returnValue As String()

returnValue = instance.UnescapeDNComponent(component)

Syntax

Visual Basic
Public MustOverride Function UnescapeDNComponent ( _
		component As String _
) As String()
C#
public abstract string[] UnescapeDNComponent (
		string component
)
C++
public:
virtual array<String^>^ UnescapeDNComponent (
		String^ component
) abstract
J#
public abstract String[] UnescapeDNComponent (
		String component
)
JScript
public abstract function UnescapeDNComponent (
		component : String
) : String[]

Parameters

component

Contains the distinguished name component from which the elements are extracted. This string can contain escaped characters.

Return Value

Returns an array of strings that contain the individual naming elements of the distinguished name.

Exceptions

Exception type Condition
System.InvalidOperationException

The distinguished name component that is represented by the component parameter is not correctly escaped, or it cannot be parsed.

Remarks

This method returns the least-significant naming element in the first element of the array, and it continues to return the naming elements in order of increasing significance. For example, if the Lightweight Directory Access Protocol (LDAP) distinguished name "cn=jeffsmith\,cn=users\,dc=fabrikam\,dc=com" is passed to this method, the array that is returned will contain the following elements:

  • cn=jeffsmith

  • cn=users

  • dc=fabrikam

  • dc=com


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also