Share via


SPCompatibilityRange.ConstrainByRange method

Retrieves a range that is the intersection of the two.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function ConstrainByRange ( _
    CompatibilityRange As SPCompatibilityRange _
) As SPCompatibilityRange
'Usage
Dim instance As SPCompatibilityRange
Dim CompatibilityRange As SPCompatibilityRange
Dim returnValue As SPCompatibilityRange

returnValue = instance.ConstrainByRange(CompatibilityRange)
public SPCompatibilityRange ConstrainByRange(
    SPCompatibilityRange CompatibilityRange
)

Parameters

Return value

Type: Microsoft.SharePoint.SPCompatibilityRange
The intersection of the ranges, with the source taking precedence if there is no intersection.

Remarks

If the intersection is empty, the minimum or the maximum of the source range is returned, whichever is closer to the target range.

See also

Reference

SPCompatibilityRange class

SPCompatibilityRange members

Microsoft.SharePoint namespace