Refactor: Eliminate code duplication in while loop, C#
<p>What are my options for rewriting following snippet to eliminate code duplication at points A and B:</p>

<pre><code>var value = source.GetNext(); // A
while (value != -1) {
    sum += value;
    value = source.GetNext(); // B
}
</code></pre>

<p>Rewriting using mid-loop break is <strong>not acceptable</strong>:</p>

<pre><code>while (true) {
    int value = source.GetNext();
    if (value == -1) break;
    sum += value;
} 
</code></pre>
