title: How can I find the type of a datasource?
body: <p>I am trying to debug the following line of code</p>
  
  <pre><code>binding.DataSource = this.bindingSource.DataSource;
  </code></pre>
  
  <p>and want to find out more information about binding.DataSource</p>
  
  <p>In the immediate window the query ? binding.DataSource  returns </p>
  
  <pre><code>Count = 1
  [0]: {Contact Events}
  </code></pre>
  
  <p>I want to cast the binding.DataSource to something I can query with intellisense?
  What should  I cast it to ?</p>
  
  <p>[Update] 
  The binding source was created as follows;</p>
  
  <pre><code>public BindingSource GetEventTypesBindingSource()
      {
          try
          {
            DbSet&lt;ContactEventType&gt; dset = base.Context.ContactEventTypes;
            IOrderedQueryable&lt;ContactEventType&gt; qry = dset.Where(p =&gt; p.Id &gt; 0).OrderBy(x =&gt; x.Description);
              qry.Load();
              var bindingSource = new BindingSource();
              bindingSource.DataSource = dset.Local.ToBindingList();
              return bindingSource;
          }
          catch (Exception ex)
          {
              HandleException.Show(ex);
          }
          return null;
      }
  </code></pre>
  
  <p>[Update]
  I tried the following in the debugger </p>
  
  <pre><code>? (List&lt;ContactEvent&gt;) binding.DataSource.GetType() 
  </code></pre>
  
  <p>but get </p>
  
  <pre><code>The type or namespace name 'List' is not valid in this scope
  </code></pre>