title: Comparing 2 float variables in Array using Array.FindIndex
body: <p>We have an array having items from a ienumerator object. One of the field is of type float.
  While trying to get the index of an item using Array.FindIndex on the float field, It is working fine if it is having 2 digits precisions (ex: 23.34), but if the precession is more than 2 digits (ex: 23.345) it is returning -1.</p>
  <p>following is what we are doing:</p>
  <pre><code>var items = customer.orders.OrderBy(o =&gt; o.price).ToArray();
  
  foreach (var order in object.orders)
  {
      int itemIndex= Array.FindIndex(items , i =&gt; i.price == order.price);
      
  }
  </code></pre>
  <p>in the above example, if the price = 50.64 then Array.FindIndex returns exact index from the items array. But if the price = 50.654 (with more than 2 digits of precesion) it is returning -1 as index (means item not found in array).</p>
  <p>Any simple way to solve this issue???</p>
  <p>Thanks!!!</p>