FieldAccessorGetInstanceValueTInstance, TField(TInstance) Method
Gets the strongly typed value of an instance field in a reference type.
If the type of the field or the declaring instance is not known at compile time the non-generic
Get method can be used.
Namespace: KGySoft.ReflectionAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public TField GetInstanceValue<TInstance, TField>(
TInstance instance
)
where TInstance : class
Public Function GetInstanceValue(Of TInstance As Class, TField) (
instance As TInstance
) As TField
public:
generic<typename TInstance, typename TField>
where TInstance : ref class
TField GetInstanceValue(
TInstance instance
)
member GetInstanceValue :
instance : 'TInstance -> 'TField when 'TInstance : not struct
- instance TInstance
- The instance that the field belongs to.
- TInstance
- The type of the instance that declares the field.
- TField
- The type of the field.
TFieldThe value of the field.