Question
What is the difference between setting [...].DataSource an object instance and a class type? I have seen both methods that are used in our code base, and I am trying to bow my head to the fact that this is somehow in any of these cases.
Example
how
object1.DataSource = typeof(SomeClass);
differ from
object2.DataSource = getSomeObject();
Further inquiry
Also, in the first case, if I set the DataSource as a class type, what happens if this class is a base class? Is data binding associated with properties that exist only in classes that come from the base class? Or does data binding only work with members of class type I that I set the DataSource to?
Itβs hard for me to write down my Google searches to give me an answer to this question. And this is because this material is complex, and I just do not formulate it correctly, or I do not quite understand some basics of data binding in C #. Can I get some help pointing in the right direction here? Thanks!
c # data-binding winforms datasource bindingsource
Jake smith
source share