How do I translate the below javascript to C#?
<p>I don't understand how 's' is being used in '(+s[i])'.  What is the '+' for?  Also I do not understand the use of the || symbol in this way, what is it doing?</p>

<pre><code>var draw = function(s){
...
if (+s[i]) a = (a+90)%360||360; // Right
else a = (a-90||360); // Left
</code></pre>

<p>In the code below I do not understand what 'while (n--)' does?</p>

<pre><code>var getS = function(n){
    var s = '';
    while (n--) s += getNext(0);
    return s;
};
</code></pre>

<p>If you want to look at this code in context go to <a href="http://fractal.qfox.nl/" rel="nofollow">http://fractal.qfox.nl/</a> and press F12 to get the developer tools up and look for dragon.js in the scripts.  Please feel entirely free to post a complete translation to C# as well if you fancy the challenge.</p>
