The PropertyInfo class has the GetValue method which takes two parameters, the first one is the instance of the property.
Well it’s just doesn’t make sense to me, why the ProperyInfo doesn’t hold the value?
I get the PropertyInfo from the instance and then I need the Instance again to retrieve the value?!
That’s weird.
Can someone please explain me why C# built that way?
A
PropertyInfois “metadata”; it is associated with a property defined on a type, not an instance.