how can I get instance from the property.

Posted by viky on Stack Overflow See other posts from Stack Overflow or by viky
Published on 2010-03-24T08:20:49Z Indexed on 2010/03/24 8:23 UTC
Read the original article Hit count: 248

Filed under:
|
|

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 create a List of MyProperty whenever creating object of MyType 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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about property