removeFirst and addLast methods of LinkedList Class are Unknown
<p>I have a problem with my  code in C# . if i  click in compiler button , I get the following errors</p>

<blockquote>
  <p>'<code>System.Collections.Generic.LinkedList&lt;int?&gt;</code>'
  does not contain a definition for
  'removeFirst' and no extension method
  'removeFirst' accepting a first
  argument of type
  '<code>System.Collections.Generic.LinkedList&lt;int?&gt;</code>'
  could be found (are you missing a
  using directive or an assembly
  reference?).</p>
</blockquote>

<p>and</p>

<blockquote>
  <p>'<code>System.Collections.Generic.LinkedList&lt;Hanoi_tower.Sol&gt;</code>'
  does not contain a definition for
  'addLast' and no extension method
  'addLast' accepting a first argument
  of type
  '<code>System.Collections.Generic.LinkedList&lt;Hanoi_tower.Sol&gt;</code>'
  could be found (are you missing a
  using directive or an assembly
  reference?)</p>
</blockquote>

<p>This is my program</p>

<pre><code>using System.;

using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hanoi_tower
{
   public class Sol
    {

public LinkedList&lt;int?&gt; tower1 = new LinkedList&lt;int?&gt;();
   public LinkedList&lt;int?&gt; tower2 =new LinkedList&lt;int?&gt;();
   public LinkedList&lt;int?&gt; tower3 =new LinkedList&lt;int?&gt;();
   public int depth;

   public LinkedList&lt;Sol&gt; neighbors;

    public Sol(LinkedList&lt;int?&gt; tower1, LinkedList&lt;int?&gt; tower2, LinkedList&lt;int?&gt; tower3)
    {
        this.tower1 = tower1;
        this.tower2 = tower2;
        this.tower3 = tower3;

        neighbors = new LinkedList&lt;Sol&gt;();
    }

    public virtual void getneighbors()
    {

        Sol temp = this.copy();
        Sol neighbor1 = this.copy();
        Sol neighbor2 = this.copy();
        Sol neighbor3 = this.copy();
        Sol neighbor4 = this.copy();
        Sol neighbor5 = this.copy();
        Sol neighbor6 = this.copy();


        if (temp.tower1.Count != 0)
        {

            if (neighbor1.tower2.Count != 0)
            {
                if (neighbor1.tower1.First.Value &lt; neighbor1.tower2.First.Value)
                {
                    neighbor1.tower2.AddFirst(neighbor1.tower1.RemoveFirst);
                    neighbors.AddLast(neighbor1);
                }

            }
            else
            {
                neighbor1.tower2.AddFirst(neighbor1.tower1.RemoveFirst());
                neighbors.AddLast(neighbor1);
            }



            if (neighbor2.tower3.Count != 0)
            {
                if (neighbor2.tower1.First.Value &lt; neighbor2.tower3.First.Value)
                {
                    neighbor2.tower3.AddFirst(neighbor2.tower1.RemoveFirst());
                    neighbors.AddLast(neighbor2);
                }
            }
            else
            {
                neighbor2.tower3.AddFirst(neighbor2.tower1.RemoveFirst());
                neighbors.AddLast(neighbor2);
            }

        }




        //-------------

        if (temp.tower2.Count != 0)
        {


            if (neighbor3.tower1.Count != 0)
            {
                if (neighbor3.tower2.First.Value &lt; neighbor3.tower1.First.Value)
                {
                    neighbor3.tower1.AddFirst(neighbor3.tower2.RemoveFirst());
                    neighbors.AddLast(neighbor3);
                }
            }
            else
            {
                neighbor3.tower1.AddFirst(neighbor3.tower2.RemoveFirst());
                neighbors.AddLast(neighbor3);
            }



            if (neighbor4.tower3.Count != 0)
            {
                if (neighbor4.tower2.First.Value &lt; neighbor4.tower3.First.Value)
                {
                    neighbor4.tower3.AddFirst(neighbor4.tower2.RemoveFirst());
                    neighbors.AddLast(neighbor4);
                }
            }
            else
            {
                neighbor4.tower3.AddFirst(neighbor4.tower2.RemoveFirst());
                neighbors.AddLast(neighbor4);
            }


        }


        //------------------------

        if (temp.tower3.Count() != 0)
        {


            if (neighbor5.tower1.Count() != 0)
             {
                if(neighbor5.tower3.ElementAtOrDefault() &lt; neighbor5.tower1.ElementAtOrDefault())
                {
                    neighbor5.tower1.AddFirst(neighbor5.tower3.RemoveFirst());
                neighbors.AddLast(neighbor5);
                }
             }
                 else
                 {
             neighbor5.tower1.AddFirst(neighbor5.tower3.RemoveFirst());
             neighbors.AddLast(neighbor5);
                 }



            if (neighbor6.tower2.Count() != 0)
             {
                if(neighbor6.tower3.element() &lt; neighbor6.tower2.element())
                {
                    neighbor6.tower2.addFirst(neighbor6.tower3.removeFirst());
                 neighbors.addLast(neighbor6);
            }
             }
                else
                {
             neighbor6.tower2.addFirst(neighbor6.tower3.removeFirst());
             neighbors.addLast(neighbor6);
                }

            }
    }

        public override string ToString()
{

    string str;

    str="tower1"+ tower1.ToString() + "   tower2" + tower2.ToString() + "   tower3" + tower3.ToString();


    return str;

}


        public Sol copy()

{

    Sol So;
     LinkedList&lt;int&gt; l1= new LinkedList&lt;int&gt;();
     LinkedList&lt;int&gt; l2=new LinkedList&lt;int&gt;();
     LinkedList&lt;int&gt; l3 = new LinkedList&lt;int&gt;();


     for(int i=0;i&lt;=this.tower1.Count() -1;i++)
     {

         l1.AddLast(tower1.get(i));

     }



      for(int i=0;i&lt;=this.tower2.size()-1;i++)
     {

         l2.addLast(tower2.get(i));

     }

      for(int i=0;i&lt;=this.tower3.size()-1;i++)
     {

         l3.addLast(tower3.get(i));

     }


      So = new Sol(l1, l2, l3);
     return So;

}



        public bool Equals(Sol sol)

{

    if (this.tower1.Equals(sol.tower1) &amp; this.tower2.Equals(sol.tower2) &amp; this.tower3.Equals(sol.tower3))
        return true;

    return false;

}


        public virtual bool containedin(Stack&lt;Sol&gt; vec)
     {

         bool found =false;

         for(int i=0;i&lt;= vec.Count-1;i++)
         {
            if(vec.get(i).tower1.Equals(this.tower1) &amp;&amp; vec.get(i).tower2.Equals(this.tower2) &amp;&amp; vec.get(i).tower3.Equals(this.tower3))
            {
                found=true;
              break;
         }

         }

         return found;
     }

}


    }
</code></pre>
