Re: getting values from object with reflection ?
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 10/20/04
- Next message: Jon Skeet [C# MVP]: "Re: Threading architectural question [C#]"
- Previous message: Richard Blewett [DevelopMentor]: "Re: Threading architectural question [C#]"
- In reply to: andrewcw: "getting values from object with reflection ?"
- Next in thread: Kevin Yu [MSFT]: "Re: getting values from object with reflection ?"
- Reply: Kevin Yu [MSFT]: "Re: getting values from object with reflection ?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 01:50:17 +0100
andrewcw <andrewcw@acw.com> wrote:
> I have a snippet of code that feeds a tree view, the properties show up BUT
> if I try and obtain the values of the property the code throws an error.
>
> // throws an excpetion
> //property_value = p.GetValue(this,null); //
> // the VN .NET code for a similar project has
> // property_value = .GetValue(Me, Nothing)
> // i
>
> Of course the object would not have values unless this object is
> instantiated. So maybe that is a problem too. Please advise here's the
> trouble:
Could you post a short but complete program which demonstrates the
problem?
See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Jon Skeet [C# MVP]: "Re: Threading architectural question [C#]"
- Previous message: Richard Blewett [DevelopMentor]: "Re: Threading architectural question [C#]"
- In reply to: andrewcw: "getting values from object with reflection ?"
- Next in thread: Kevin Yu [MSFT]: "Re: getting values from object with reflection ?"
- Reply: Kevin Yu [MSFT]: "Re: getting values from object with reflection ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|