PropertyAccessorGetInstanceValueTInstance, TProperty(TInstance) Method
Gets the strongly typed value of a non-indexed instance property in a reference type.
If the type of the property or the declaring instance is not known at compile time the non-generic
Set methods can be used.
Namespace: KGySoft.ReflectionAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public TProperty GetInstanceValue<TInstance, TProperty>(
TInstance instance
)
where TInstance : class
Public Function GetInstanceValue(Of TInstance As Class, TProperty) (
instance As TInstance
) As TProperty
public:
generic<typename TInstance, typename TProperty>
where TInstance : ref class
TProperty GetInstanceValue(
TInstance instance
)
member GetInstanceValue :
instance : 'TInstance -> 'TProperty when 'TInstance : not struct
- instance TInstance
- The instance that the property belongs to.
- TInstance
- The type of the instance that declares the property.
- TProperty
- The type of the property.
TPropertyThe value of the property.