RunLengthEncodeExtensionRunLengthEncodeT(IEnumerableT) Method
            Run-length encodes a sequence by converting consecutive instances of the same element into
            a KeyValuePair{T,int} representing the item and its occurrence count.
            
Namespace: MoreLinq.ExtensionsAssembly: MoreLinq (in MoreLinq.dll) Version: 4.4.0+6d97c3b1d482f98300f4446df14742b0e3fafbec
public static IEnumerable<KeyValuePair<T, int>> RunLengthEncode<T>(
	this IEnumerable<T> sequence
)
<ExtensionAttribute>
Public Shared Function RunLengthEncode(Of T) ( 
	sequence As IEnumerable(Of T)
) As IEnumerable(Of KeyValuePair(Of T, Integer))
public:
[ExtensionAttribute]
generic<typename T>
static IEnumerable<KeyValuePair<T, int>>^ RunLengthEncode(
	IEnumerable<T>^ sequence
)
[<ExtensionAttribute>]
static member RunLengthEncode : 
        sequence : IEnumerable<'T> -> IEnumerable<KeyValuePair<'T, int>> 
- sequence  IEnumerableT
- The sequence to run length encode
- T
- The type of the elements in the sequence
IEnumerableKeyValuePairT, 
Int32A sequence of 
KeyValuePair{T,int} where the key is the element and the value is the occurrence countIn Visual Basic and C#, you can call this method as an instance method on any object of type 
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).