Example:
public class MyProperty
{
//something..
}
public class MyClass
{
private MyProperty[] myProperty = null;
public MyProperty[] myProperty
{
get
{
//execute some code
return myProperty;
}
set
{
myProperty = value;
}
}
}
MyClass testMyClass = new MyClass();
myBindingSource.DataSource = testMyClass.MyProperty;
Is there a way, maybe using reflection (or inheriting from BindingSource), to get a reference to MyClass.MyProperty instance, instead of an object containg just a MyProperty[].
BindingSource.DataSource returns just that, some object, that can be cast to some MyProperty array.
The generated result should achieve this scenario:
BindingSource.DataSource = GeneratedResult; //execute some code (from the get).