PropertyAccessorGetInstanceValueTInstance, TProperty, TIndex(TInstance, TIndex) Method
Gets the strongly typed value of a single-parameter indexed property in a reference type.
If the type of the property, the declaring instance or the index parameter is not known at compile time,
or the indexer has more than one parameter, then 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, TIndex>(
TInstance instance,
TIndex index
)
where TInstance : class
Public Function GetInstanceValue(Of TInstance As Class, TProperty, TIndex) (
instance As TInstance,
index As TIndex
) As TProperty
public:
generic<typename TInstance, typename TProperty, typename TIndex>
where TInstance : ref class
TProperty GetInstanceValue(
TInstance instance,
TIndex index
)
member GetInstanceValue :
instance : 'TInstance *
index : 'TIndex -> 'TProperty when 'TInstance : not struct
- instance TInstance
- The instance that the property belongs to.
- index TIndex
- The value of the index parameter.
- TInstance
- The type of the instance that declares the property.
- TProperty
- The type of the property.
- TIndex
- The type of the index parameter.
TPropertyThe value of the property.