title: Why does the compiler think this is an Object instead of a DataRow?
body: <p>I'm using a LINQ query to translate data inside a <code>DataTable</code> object to be a simple <code>IEnumerable</code> of a custom POCO object.</p>
  
  <p>My LINQ query is:  </p>
  
  <pre><code>    Dim dtMessages As DataTable
  
      '...dtMessages is instantiated ByRef in a helper data access routine... '
  
      Dim qry = From dr As DataRow In dtMessages.Rows
                Select New OutboxMsg With {
                    .ComputerID = dr(dcComputerID),
                    .MessageData = dr(dcMessageData),
                    .OutBoxID = dr(dcOutBoxID),
                    .OutBoxReceivedID = dr(dcOutBoxReceivedID),
                    .TrxDate = dr(dcTrxDate)
                }
  </code></pre>
  
  <p>However, the compiler is throwing a warning message under <code>dr As DataRow</code> with the message:</p>
  
  <blockquote>
    <p>Option Strict On disallows implicit conversions from 'Object' to 'System.Data.DataRow'.</p>
  </blockquote>
  
  <p>Why am I getting this error and what do I need to do to fix it?  I would have thought that <code>dtMessages.Rows</code> returned a collection of type <code>DataRow</code>. Is this not correct?</p>