Linked List: Insert item btween current and current.next
<p>Currently I am learning how to build my own linked list in C#. I have created a function called <code>AddTrees</code> that  adds a tree to the end of the list. User create their trees through textboxes input:<code>tree_name</code>, <code>tree_height</code>, <code>tree_price</code> and <code>tree_instock</code>. I am requesting help with my <code>InsertTree</code> which is not inserting a tree between current and <code>current.next_tree</code>? But instead of instead of inserting it between, it adds it to the top of the list.</p>

<pre><code>   namespace Tree_farm
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            public class TheTrees
            {
                private string tree_type = " ";
                private int tree_height = 0;
                public double tree_price = 0;
                private int tree_instock = 0;


                public TheTrees next_tree;

                public TheTrees(string newtree, int newheight, int newinstock, double newprice)
                {
                    tree_type = newtree;
                    tree_height = newheight;
                    tree_price = newprice;
                    tree_instock = newinstock;


                    next_tree = null;
                }

                public override string ToString()
                {
                    return tree_type + " " + tree_height + " " + tree_price + " " + tree_instock;
                }

            }


            public class ListForTrees
            {
                public TheTrees first_tree;
                public TheTrees last_tree;

                public int count = 0;

                public ListForTrees(TheTrees new_tree)
                {
                    first_tree = new_tree;
                    last_tree = new_tree;
                    count = 1;
                }

                public ListForTrees()
                {

                }

                public void InsertTree(TheTrees new_tree)
                {
                    TheTrees current = first_tree;

                    if (count == 0)
                    {
                        first_tree = new_tree;
                        last_tree = new_tree;
                        count = 1;
                    }

                    else if (count != 0)
                    {
                        if (new_tree.tree_price &lt;= first_tree.tree_price)
                        {
                            new_tree.next_tree = first_tree;
                            first_tree = new_tree;
                        }

                        else if (new_tree.tree_price &gt;= last_tree.tree_price)
                        {
                            last_tree.next_tree = new_tree;
                            last_tree = new_tree;
                        }

                        else
                        {
                            while (new_tree.tree_price &gt; current.next_tree.tree_price)
                            {
                                 current.next_tree = current;
                            }

                            new_tree.next_tree = current.next_tree;
                            current.next_tree = new_tree;
                        }

                        count++;
                    }
                }

 public void AddTree(TheTrees new_tree)
            {
                TheTrees current = first_tree;

                if (count == 0)
                {
                    first_tree = new_tree;
                    last_tree = new_tree;
                    count = 1;
                }

                else if (count != 0)
                {
                    if (new_tree.tree_price &lt;= first_tree.tree_price)
                    {
                        new_tree.next_tree = first_tree;
                        first_tree = new_tree;
                    }

                    else if (new_tree.tree_price &gt;= last_tree.tree_price)
                    {
                        last_tree.next_tree = new_tree;
                        last_tree = new_tree;
                    }

                    else
                    {
                        while (new_tree.tree_price &gt; current.next_tree.tree_price)
                        {
                            current = current.next_tree;
                        }

                        new_tree.next_tree = current.next_tree;
                        current.next_tree = new_tree;
                    }

                    count++;
                }
            }

                public void ClearTrees()
                {
                    first_tree = null;
                    count = 0;
                }
            }

            ListForTrees mainlist = new ListForTrees();

            private void Form1_Load(object sender, EventArgs e)
            {

            }


            private void BtnInsertTree_Click(object sender, EventArgs e)
            {
                //Insert Code
                try
                {
                    int height = Convert.ToInt32(TxtTreeHeight.Text);
                    int stock = Convert.ToInt32(TxtTreeStock.Text);
                    double price = Convert.ToDouble(TxtTreePrice.Text);

                    TheTrees treeinsert = new TheTrees(TxtTreeName.Text, height, stock, price);

                    mainlist.InsertTree(treeinsert);
                }
                catch
                {
                    MessageBox.Show("Please check intput fields");
                }
            }


        private void BtnAddTree_Click(object sender, EventArgs e)
        {
            try
            {
                int height = Convert.ToInt32(TxtTreeHeight.Text);
                int stock = Convert.ToInt32(TxtTreeStock.Text);
                double price = Convert.ToDouble(TxtTreePrice.Text);

                TheTrees treeadd = new TheTrees(TxtTreeName.Text, height, stock, price);

                mainlist.AddTree(treeadd);
            }
            catch
            {
                MessageBox.Show("Please check intput fields");
            }
        }
        }
    }
</code></pre>
