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