ReflectorGetProperty(Object, PropertyInfo, Object) Method

Gets a property represented by the specified PropertyInfo.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static Object? GetProperty(
	Object? instance,
	PropertyInfo property,
	params Object?[]? indexParameters
)

Parameters

instance  Object
An instance whose property is about to be retrieved. This parameter is ignored for static properties.
property  PropertyInfo
The property to get.
indexParameters  Object
Index parameters if property is an indexer. This parameter is ignored for non-indexed properties.

Return Value

Object
The value of the property.

Remarks

For getting the property this method uses the DynamicDelegate reflection way.

  Note

To get the property explicitly by dynamically created delegates use the PropertyAccessor class.

See Also