Share via


ManagementAgent.UnescapeDNComponent Method

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

'Usage
Dim instance As ManagementAgent
Dim component As String
Dim returnValue As String()

returnValue = instance.UnescapeDNComponent(component)

Syntax

'Declaration
Public MustOverride Function UnescapeDNComponent ( _
    component As String _
) As String()
public abstract string[] UnescapeDNComponent (
    string component
)
public:
virtual array<String^>^ UnescapeDNComponent (
    String^ component
) abstract
public abstract String[] UnescapeDNComponent (
    String component
)
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

Reference

ManagementAgent Class
ManagementAgent Members
Microsoft.MetadirectoryServices Namespace
InvalidDNException Class
ManagementAgent Class