Share via


ReferenceValue.Parent Method (Int32)

Creates a new ReferenceValue object that contains the distinguished name of the parent of this ReferenceValue object, starting from the specified parent level.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As ReferenceValue
Dim skipLevels As Integer
Dim returnValue As ReferenceValue

returnValue = instance.Parent(skipLevels)

Syntax

'Declaration
Public MustOverride Function Parent ( _
    skipLevels As Integer _
) As ReferenceValue
public abstract ReferenceValue Parent (
    int skipLevels
)
public:
virtual ReferenceValue^ Parent (
    int skipLevels
) abstract
public abstract ReferenceValue Parent (
    int skipLevels
)
public abstract function Parent (
    skipLevels : int
) : ReferenceValue

Parameters

  • skipLevels
    Contains the number of parent elements in the source distinguished name to skip when creating the parent ReferenceValue object. A value of 0 creates a new ReferenceValue object with the distinguished name of the immediate parent of this ReferenceValue object.

Return Value

Returns a ReferenceValue object that contains the distinguished name of the parent of this ReferenceValue object, starting at the parent level that is indicated by the skipLevels value. For example, if the distinguished name of this ReferenceValue object is "cn=jeffsmith,dc=corp,dc=fabrikam,dc=com", Parent(1) returns a new ReferenceValue object with the distinguished name of "dc=fabrikam,dc=com".

Exceptions

Exception type Condition
System.ArgumentOutOfRangeException

The skipLevels value is less than zero or greater than the depth of the ReferenceValue object that is provided by the Depth property.

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

ReferenceValue Class
ReferenceValue Members
Microsoft.MetadirectoryServices Namespace
Depth
ReferenceValue Class