Converting IF statements to simple statement - Which one is efficient?
<p>I hope everyone will enjoy reading this.</p>

<p>I have two IF statements below</p>

<pre><code>public int GetTax(Item item)
{
   int tax=0;
   if(item.Name.Equals("Book"))
   {
      tax = 10;
   }
   if(item.Imported)
   {
      tax += 5;
   }
   return tax;
}
</code></pre>

<p>I have converted above if condition to this.</p>

<pre><code>public int GetTax(Item item)
{
     return 5 * ((int)item.Name.Equals("Book") * 2 + ((int)item.Imported));
}
</code></pre>

<p>Which one do you think efficient? and justify why?</p>
