ReferenceValue.Subcomponents Method
Creates a new ReferenceValue object that contains a set of subcomponents of this ReferenceValue object.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)
Usage
'Usage
Dim instance As ReferenceValue
Dim startingComponent As Integer
Dim endingComponent As Integer
Dim returnValue As ReferenceValue
returnValue = instance.Subcomponents(startingComponent, endingComponent)
Syntax
'Declaration
Public MustOverride Function Subcomponents ( _
startingComponent As Integer, _
endingComponent As Integer _
) As ReferenceValue
public abstract ReferenceValue Subcomponents (
int startingComponent,
int endingComponent
)
public:
virtual ReferenceValue^ Subcomponents (
int startingComponent,
int endingComponent
) abstract
public abstract ReferenceValue Subcomponents (
int startingComponent,
int endingComponent
)
public abstract function Subcomponents (
startingComponent : int,
endingComponent : int
) : ReferenceValue
Parameters
- startingComponent
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 the endingComponent value.
- endingComponent
The zero-based index of the first distinguished name element to exclude from the subcomponent. The created subcomponent does not include the name element that is contained in this parameter. This value must be greater than the startingComponent value.
Return Value
Returns a ReferenceValue object that contains the specified subcomponents.
Exceptions
Exception type | Condition |
---|---|
System.ArgumentOutOfRangeException | One of the following cases:
|
Remarks
The following example shows how the Subcomponents method returns the second and third components of the distinguished name. The output of this code is dc=domain,dc=fabrikam
.
ReferenceValue dn = Utils.MAs["ADMA"].CreateDN("cn=jeffsmith,dc=domain,dc=fabrikam,dc=com");
ReferenceValue dnSub = dn.Subcomponents(1, 3);
System.Diagnostics.Debug.WriteLine(dnSub.ToString());
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
Change History
See Also
Reference
ReferenceValue Class
ReferenceValue Members
Microsoft.MetadirectoryServices Namespace
ReferenceValue Class