Why does C# && and || operators work the way they do?
<p>here is a tl;dr</p>

<p>I come from a C++ background. &amp;&amp; is suppose to check if left side is true and right side is true. what does &amp; have anything to do with this? Why is it being used in the &amp;&amp; logic?</p>

<hr>

<p>I couldnt understand <a href="http://msdn.microsoft.com/en-us/library/aa691312%28v=vs.71%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa691312%28v=vs.71%29.aspx</a> and asked a question. It took me quite a while to understand and accept this answer. I had to do a lot of follow up reading <a href="http://stackoverflow.com/questions/5203093/how-does-operator-overloading-of-true-and-false-work/5203185#5203185">How does operator overloading of true and false work?</a></p>

<blockquote>
  <p>The operation x &amp;&amp; y is evaluated as
  T.false(x) ? x : T.&amp;(x, y)</p>
</blockquote>

<p>Why on earth is it doing this? if the false overload returns true and the true operator returns true then y is not evaluated at all. WTF!!!!</p>

<p>I still cant understand it. Because of this being so weird to me it took me a while to understand the answers in the other question. In C# <code>v = 1 &amp;&amp; 2;</code> does not work bc you cant do &amp;&amp; on ints. In C this returns true (heres code/example <a href="http://codepad.org/9iCaqzQ2" rel="nofollow">http://codepad.org/9iCaqzQ2</a>). If we follow the operation rule above for this we would do</p>

<p>(using 1 &amp;&amp; 2)</p>

<ul>
<li>Int.False(1) is false</li>
<li>1 &amp; 2 (== 0)</li>
<li>Int.True(0) (== false)</li>
</ul>

<p>This would get you the wrong results.</p>

<p>So... What is the reasoning for C# doing the &amp;&amp; (and ||) operator(s) the way it does.</p>
