PropertyAccessorGetInstanceValueTInstance, TProperty, TIndex(TInstance, TIndex) Method
Gets the strongly typed value of a single-parameter indexed property in a value 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>(
in TInstance instance,
TIndex index
)
where TInstance : struct, new()
Public Function GetInstanceValue(Of TInstance As {Structure, New}, TProperty, TIndex) (
ByRef instance As TInstance,
index As TIndex
) As TProperty
public:
generic<typename TInstance, typename TProperty, typename TIndex>
where TInstance : value class, gcnew()
TProperty GetInstanceValue(
[InAttribute] TInstance% instance,
TIndex index
)
member GetInstanceValue :
instance : 'TInstance byref *
index : 'TIndex -> 'TProperty when 'TInstance : struct, new()
- 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.