<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Asem Rahal on Medium]]></title>
        <description><![CDATA[Stories by Asem Rahal on Medium]]></description>
        <link>https://medium.com/@assem.rh?source=rss-27f198e26540------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lIwcYq2AQ2I2n0oy.</url>
            <title>Stories by Asem Rahal on Medium</title>
            <link>https://medium.com/@assem.rh?source=rss-27f198e26540------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:30:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@assem.rh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is difference between single ampersand & and dual ampersand && operator in c# ?]]></title>
            <link>https://medium.com/@assem.rh/what-is-difference-between-single-ampersand-and-dual-ampersand-operator-in-c-97be0f698943?source=rss-27f198e26540------2</link>
            <guid isPermaLink="false">https://medium.com/p/97be0f698943</guid>
            <dc:creator><![CDATA[Asem Rahal]]></dc:creator>
            <pubDate>Mon, 10 Apr 2023 15:30:48 GMT</pubDate>
            <atom:updated>2023-04-10T15:31:14.295Z</atom:updated>
            <content:encoded><![CDATA[<h3>CWhat is the difference between single ampersand &amp; and dual ampersand &amp;&amp; operator in c# ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zin5snkMX0fVeYNXIl6EA.jpeg" /></figure><p>In C#, the single ampersand (&amp;) and dual ampersand (&amp;&amp;) operators are used for logical operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zin5snkMX0fVeYNXIl6EA.jpeg" /></figure><p>The main difference between these two operators is the way they evaluate the expressions on their left and right sides.</p><p>The single ampersand (&amp;) operator evaluates both the expressions on its left and right sides, even if the left expression is false. It performs a bitwise AND operation on the two expressions.</p><p>For example:</p><pre>int x = 5;<br>int y = 10;<br>if (x == 5 &amp; y &gt; 5) // Both expressions are evaluated<br>{<br>    // Do something<br>}</pre><p>The dual ampersand (&amp;&amp;) operator, on the other hand, only evaluates the right-hand expression if the left-hand expression is true. If the left-hand expression is false, the right-hand expression is not evaluated. This is known as short-circuiting.</p><p>For example:</p><pre>int x = 5;<br>int y = 10;<br>if (x == 5 &amp;&amp; y &gt; 5) // Right-hand expression is only evaluated if left-hand expression is true<br>{<br>    // Do something<br>}</pre><p>In general, the dual ampersand (&amp;&amp;) operator is more commonly used in C# programming, as it can improve performance by avoiding unnecessary evaluations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97be0f698943" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>