Partager via


ReferenceValue.Parent Method

The Parent(Int32) method creates a new ReferenceValue object that contains the distinguished name of the parent of this ReferenceValue object, starting from the specified parent level.

Syntax

public ReferenceValue Parent(
  Int32 skipLevels
);
Public Function Parent( _
  ByVal skipLevels As Int32 _
) As 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 will create 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 indicated by skipLevels. 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
ArgumentOutOfRangeException

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

Requirements

Product ILM 2007 FP1
Namespace Microsoft.MetadirectoryServices
Assembly Microsoft.MetadirectoryServices
.NET Framework .NET Framework 2.0

See Also

ReferenceValue
ReferenceValue.Depth

Send comments about this topic to Microsoft

Build date: 2/16/2009