title: Unity List Exists only first pass
body: <p>I have a small routine that check if an entry exists:</p>
  
  <pre><code>public class cart {public string name; public int cost; public int amt;}
  public string[,] prod_Array = new string[6,2];
  public List&lt;cart&gt; cart_array = new List&lt;cart&gt;();
  public cart mycart = new cart ();
  public void buyProduct (string product) {
      string item = "";
      switch (product) {
      case "fishTank":
          cost = int.Parse(prod_Array[5,1]);
          if(cart_array.Exists(cart =&gt; cart.name == "Fish Tank") ){
              cart qty = cart_array.Find(cart =&gt; cart.name == "Fish Tank");
              qty.amt= qty.amt+1;
              fillCartTxt(cart_count);
          } else {
              Debug.Log("None found");
              item = "Fish Tank";
              make_cart_text(item, cost);
          }
          break;
      case "growBed":
          cost = int.Parse(prod_Array[4,1]);
          if(cart_array.Exists(cart =&gt; cart.name == "Grow Bed")){
              cart qty = cart_array.Find(cart =&gt; cart.name == "Grow Bed");
              qty.amt= qty.amt+1;
              fillCartTxt(cart_count);
          } else {
              item = "Grow Bed";
              make_cart_text(item, cost);
          }
          break;
      }
  </code></pre>
  
  <p>It works perfect the first time if you select "Fish Tank" as many times as you want, however, if you select "Grow Bed" after that and then go back and select "Fish Tank" again, it fails and goes to the else statement to create a new text.
  Why does it only work the first time?
  forgot to add this:</p>
  
  <pre><code>void make_cart_text(string item, int cost){
      mycart.name = item;
      mycart.cost = cost;
      mycart.amt = 1;
      int ny = 0;
      cart_array.Add(mycart);
      cart_count = cart_array.Count;
      if (cart_count == 1) {
          ny =50;
      } else if (cart_count &gt; 1) {
          ny = cart_count * 20;
      }
      GameObject cart_line = GameObject.Instantiate(
          Resources.Load("cart_line"),
      new Vector3(19f,ny,0),Quaternion.identity)as GameObject;
      cart_line.name= "carttext"+cart_count;
      GameObject gc2 = GameObject.Find ("Cart");
      cart_line.transform.SetParent(gc2.transform, false);
      fillCartTxt(cart_count);
  }
  </code></pre>