title: Casting specific observablecollection to a generic observablecollection
body: <p>I would appreciate your valuable input in order solving my issue.</p>
  
  <p>I have an Interface which is none generic</p>
  
  <pre><code>public interface IOffice
  {
     ObservableCollection&lt;Employee&gt; Employees{ get; set; }
  }
  </code></pre>
  
  <p>The 'Employee' is an entity.</p>
  
  <pre><code>public class Employee
  {
     public int Id {get;set;}
     public string Name {get, set}
  }
  </code></pre>
  
  <p>I extend this interface in a generic abstract class, which facilitates sending any extended
  type of Employee as a type parameter.
  But I'm having an issue casting the specific property "Employees" to a generic "Employee" property in the abstract class like below. 
  It shows compiler casting error.</p>
  
  <pre><code>public abstract HeadOffice&lt;T&gt; : IOffice
  where T : Employee
  {
       ObservableCollection&lt;T&gt; _employees = new ObservableCollection&lt;T&gt;();
       public ObservableCollection&lt;Employee&gt; Employees
        { 
            get{return employees;} 
            set{employees = value;} 
        }
  }
  </code></pre>
  
  <p>NOTE : This could be solved if we could change the interface into a generic 'IOffice'. But we don't have a control over the interface.</p>
  
  <p>Appreciate all your feedback and do contact me if you require classifying anything with regard to the issue.</p>
  
  <p>Thanks
  RSF</p>