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