foreach statement cannot operate on variables of type
<p>here is i am trying to work.</p>

<pre><code>List&lt;MasterEmployee &gt; masterEmployee = new List&lt;MasterEmployee &gt;();
masterEmployee = MasterEmployee.GetAll("123"); //connecting db and returning a list...


  foreach (MasterEmployee item in masterEmployee)
   {
      foreach (Registration reg in item.Registration) //&lt;&lt;&lt;error here...
      {
           //
      }
  }
</code></pre>

<p>error here:</p>

<pre><code>Error   2   foreach statement cannot operate on variables of type Registration because Registration does not contain a public definition for 'GetEnumerator'
</code></pre>

<p>i have a class called MasterEmployee and in it i have a with few props and few methods on it</p>

<pre><code> [Serializable]
    public class MasterEmployee 
    {

        //few props omitted  ....

        protected Registration _registration;
        [CopyConstructorIgnore]
        public Registration Registration
        {
            get
            {
                return _registration;

            }
            set
            {
                this._registration = value;
            }
        }
        protected User _user;
        [CopyConstructorIgnore]
        public User MyUser
        {
            get
            {
               return _user;
            }
            set
            {
                this._user= value;
            }
        }

        protected Student _student;
        [CopyConstructorIgnore]
        public Student Student
        {
            get
            {
                return _student;
            }
            set
            {
                this._student = value;
            }
        }
}
</code></pre>
