Gemstone Common Library
Show/Hide TOC

# Range TRange, TState MergeConsecutiveOverlapping(IEnumerableRange TRange, TState, IComparer TRange) Method

Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.

## Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.150 -- Release Build+64e3b411e1abfbd2d4d8a81e850c3909a0ce8731
C#
View Source Request Example

    public static IEnumerable<Range<TRange, TState>> MergeConsecutiveOverlapping(
    	IEnumerable<Range<TRange, TState>> ranges,
    	IComparer<TRange> comparer
    )

VB
View Source Request Example

    Public Shared Function MergeConsecutiveOverlapping (
    	ranges As IEnumerable(Of Range(Of TRange, TState)),
    	comparer As IComparer(Of TRange)
    ) As IEnumerable(Of Range(Of TRange, TState))

C++
View Source Request Example

    public:
    static IEnumerable<Range<TRange, TState>^>^ MergeConsecutiveOverlapping(
    	IEnumerable<Range<TRange, TState>^>^ ranges,
    	IComparer<TRange>^ comparer
    )

JavaScript
View Source Request Example

    Gemstone.Range.MergeConsecutiveOverlapping = function(ranges, comparer);

#### Parameters

ranges IEnumerable Range TRange, TState
  The collection of ranges.
comparer IComparer TRange
  The comparer used to compare objects of type TRange.

#### Return Value

IEnumerable Range TRange, TState
The collection of merged ranges.

## See Also

#### Reference

RangeTRange, TState Class
MergeConsecutiveOverlapping Overload
Gemstone Namespace