title: Serialize List<T> error reflecting field
body: <p>New to xml serialization and could not find my specific issue.</p>
  
  <p>Using this code to serialize:</p>
  
  <pre><code>Human h = new Human();
  
  XmlSerializer writer = new XmlSerializer( typeof( Human ) );
  
  System.IO.StreamWriter file = new System.IO.StreamWriter(
    @"c:\temp\serializerExample.xml" );
  writer.Serialize( file, h );
  file.Close();
  </code></pre>
  
  <p>Get inner exception: </p>
  
  <blockquote>
    <p>{"There was an error reflecting field '_foods'."}</p>
  </blockquote>
  
  <p>Human:</p>
  
  <pre><code>public class Human : Mammal
  {
  public string Name
  {
    get
    {
      return "Bob";
    }
  }
  public Human()
  {
    this.AddFood( new Hamburger("Name") );
    this.AddFood( new Salad("Name") );
  }
  </code></pre>
  
  <p>and Mammal where the error talked about:</p>
  
  <pre><code>  public abstract class Mammal
    {
      public List&lt;Food&gt; _foods = new List&lt;Food&gt;();
  
      protected void AddFood(Food food)
      {
        _foods.Add( food );
      }
  
      public void Eat()
      {
        foreach ( var food in _foods )
        {
          food.Eat();
        }
      }
    }
  </code></pre>
  
  <p>Food:</p>
  
  <pre><code>  [XmlRoot(Namespace="Food")]
    [XmlInclude(typeof(Hamburger))]
    [XmlInclude( typeof( Salad ) )]
    public abstract class Food
    {
      public string PropertyName
      {
        get;
        set;
      }
      public abstract int Calories
      {
        get;
      }
      public abstract void Eat();
      public Food()
      {
      }
      public Food( string propertyName )
      {
        PropertyName = propertyName + " food ";
      }
    }
  </code></pre>
  
  <p>Hamburger:</p>
  
  <pre><code>public class Hamburger : Food
    {
      public Hamburger()
      {
      }
      public Hamburger(string propertyName) :base(propertyName)
      {
  
      }
      public override int Calories
      {
        get
        {
          return 500;
        }
      }
  
      public override void Eat()
      {
        Console.WriteLine( "Eat Hamburgers" );
      }
    }
  </code></pre>
  
  <p>Salad:</p>
  
  <pre><code>  public class Salad : Food
    {
      public Salad(string propertyName) : base(propertyName)
      {
  
      }
      public override int Calories
      {
        get
        {
          return 200;
        }
      }
  
      public override void Eat()
      {
        Console.WriteLine( "Eat Salad" );
      }
    }
  </code></pre>