In my application I have a class which has properties of user-defined types like this:
class MyType
{
public A MyProperty
{
get;
set;
}
}
class A
{
.....some methods and proeprties
}
for some operations that I need to perform from my main program, I have created a List of A and add in to it MyProperty whenever creating object of MyType
List<A> myList = new List<A>();
MyType m1 = new MyType();
myList.Add(m1.MyProperty);
MyType m2 = new MyType();
myList.Add(m2.MyProperty);
......more instances
and pass it to my main program and there I perform different operation on these properties which reflects in there instances also. Is there any way by which I could get the object instance for any particular MyProperty from that property in the list.