Best way to find how many times an item in a list repeats in a row, in C#? : <p>Given a list, for example:
<code>List&lt;int&gt; _ = new List&lt;int&gt;() { 1, 1, 1, 3, 3, 4, 4, 1, 1, 8, 8, 8, 5, 6, 7, 7, 7, 7, 8, 8 };</code></p>

<p>What would be the best / fastest / most efficient way to find how many times an item repeats in a row, in C#?
For this list, the result I'd be looking for is something that looks like this:</p>

<p>1 * 3</p>

<p>3 * 2</p>

<p>4 * 2</p>

<p>1 * 2</p>

<p>8 * 3</p>

<p>5 * 1</p>

<p>6 * 1</p>

<p>7 * 4</p>

<p>8 * 2</p>

<p>Doesn't have to be in this odd multiplication format, I think it makes it a bit easier to understand.</p>

<p>I've been trying looping over the List and comparing each item to the next, but I inevitably get stuck, and don't really know what to do.</p>
