What is the most elegant/efficient way to determine if many variables are unique?
<p>If I have five variables </p>

<pre><code>int a,b,c,d,e;
</code></pre>

<p>What is the most efficient way to make sure they are all unique?</p>

<pre><code>if(a!=b &amp;&amp; a!=c &amp;&amp; a!=d &amp;&amp; a!=e &amp;&amp; b!=c &amp;&amp; b!=d &amp;&amp; b!=e &amp;&amp; c!=d &amp;&amp; c!=e &amp;&amp; d!=e)
{ 
   //Is this the most efficient way??
}
</code></pre>
