You are trying to use this method:
http://msdn.microsoft.com/en-us/library/b05d59ty%28v=vs.110%29.aspx[
^].
You do it completely wrong, with wrong parameters. First parameter should be some instance of the object. It's totally pointless to get
_pi.GetType
, this type is known,
PropertyInfo
. Second parameter will be non-null only for indexed properties.
All you need is to think a bit. You wrote you code without any understanding of what object would you need to get and from what object. This is easy, just think about it. I don't know where is the object to get a property value, because you started with its type, you may or may not have it. The first parameter can be null, quite naturally, that means this is a static property. You can sort out static properties from non-static using appropriate
BindingFlags
.
—SA