title: Exposing interfaces instead of concrete classes
body: <p>I've recently read something about using interfaces when exposing collections instead of concrete implementations (IEnumerable instead of List). I'm trying to do that now in my code. However, when I expose a property that return IEnumerable, I'm having some difficulty of not allowing nulls as a return value. Example:</p>
  
  <pre><code>public class HumanResource
  {
      public IEnumerable&lt;EmployeeModel&gt; Employees
      {
          get
          {
              // return what?
          }
      }
  }
  </code></pre>
  
  <p>What should I return in the getter? I don't want to use automatic properties for this as I want to avoid nulls. What I want is to return a new collection with no items. Of course I can return any type that implements IEnumerable but how will the external user of the class know that? Or did I understand this exposing interface instead of concrete implementations wrong?</p>
  
  <p>EDIT: Removed setter</p>