Operator '&&' cannot be applied to operands of type 'bool'
<pre><code>if ((!s.IsValidCashFlow) &amp;&amp; (s.Cash.InvalidCashFlowReason == InvalidCashFlowReason.IAmAPoorMF))
</code></pre>

<p>I guess you can't do this in C#?  isValidCashFlow is a bool property</p>

<p>updated:</p>

<p>the error is actually in my .ascx, wrong place: </p>

<pre><code>&lt;div id="Div1" " runat="server" visible="&lt;%#(!Container.DataItem.IsValidCashFlow &amp;&amp; (Product)Container.DataItem.Product)InvalidCashFlowReason == InvalidCashFlowReason.IAmAPoorMF %&gt;"&gt;
</code></pre>

<p>Resolved: I added the extra () as the compiler was getting confused:</p>

<pre><code>&lt;div id="Div1" " runat="server" visible="&lt;%#(!Container.DataItem.IsValidCashFlow &amp;&amp; ((Product)Container.DataItem.Product)InvalidCashFlowReason == InvalidCashFlowReason.IAmAPoorMF) %&gt;"&gt;
</code></pre>
