Microsoft Identity Integration Server 2003 Developer Reference

ReferenceValue.Subcomponents

The Subcomponents method creates a new ReferenceValue object that contains a set of subcomponents of this ReferenceValue object.
[C#]
public ReferenceValue Subcomponents(
  Int32 startingComponent,
  Int32 endingComponent
);
[Visual Basic .NET]
Public Function Subcomponents( _
  ByVal startingComponent As Int32, _
  ByVal endingComponent As Int32 _
) As ReferenceValue

Parameters

startingComponent
Contains the zero-based index of the first distinguished name element to include in the subcomponent. The created subcomponent includes the first distinguished name element. This value must be less than endingComponent.
endingComponent
Contains the zero-based index of the first distinguished name element to exclude from the subcomponent. The created subcomponent does not include the first distinguished name element. This value must be greater than startingComponent.

Return Values

Returns a ReferenceValue object that contains the specified subcomponents.

Exceptions

Exception type Condition
ArgumentOutOfRangeException One of the following cases:
  • The startingComponent or endingComponent value is not valid in the ReferenceValue object.
  • The startingComponent value is greater than or equal to endingComponent.
  • The startingComponent or endingComponent value is greater than the depth of the ReferenceValue object provided by the ReferenceValue.Depth property.

Remarks

The following example shows how the Subcomponents method returns the second and fourth components of the distinguished name. The output of this code will be "dc=domain,dc=fabrikam".

ReferenceValue dn = Utils.DN("cn=jeffsmith,dc=domain,dc=fabrikam,dc=com");
ReferenceValue dnSub = dn.Subcomponents(1, 3);
System.Diagnostics.Debug.WriteLine(dnSub.ToString());

Requirements

Product: Microsoft Identity Integration Server 2003
Namespace: Defined in Microsoft.MetadirectoryServices.
Assembly: Requires Microsoft.MetadirectoryServices (in Microsoft.MetadirectoryServices.dll).
.NET Framework: Requires .NET Framework 1.1.

See Also

ReferenceValue