Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: IEnumerable<T> RemoveConsecutiveDuplicates<T>(this IEnumerable<T>, bool)

  • Declared in: RT.Modeling.Md

Declaration

public static IEnumerable<T> RemoveConsecutiveDuplicates<T>(
    this IEnumerable<T> source,
    bool closed
)

Summary

Removes consecutive duplicates from a collection.

Generic type parameters

T
  • Must derive from: System.IEquatable<T>.
Type of elements in the collection.

Parameters

this IEnumerable<T>source Input elements to process.
boolclosed Specifies whether the last element is considered to connect back to the first element (closed loop).

Returns

The reduced collection.

Exceptions

  • System.ArgumentNullException
    source was null.