title: c#, interface, assignment
body: <p>I have a question. Interface does not hold any definition. Interface can not be instantiated. How can this code be valid ?</p>
  
  <pre><code>IDataReader reader = cmd.ExecuteReader()
  </code></pre>
  
  <p>cmdExecuteReader returns an object with a value in memory. reader is interface. How can an object be assigned to an interface ? isnt interface just a contract with no method definitions inside ?</p>