FieldAccessorSetInstanceValueTInstance, TField(TInstance, TField) Method
Sets 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
Set method can be used.
Namespace: KGySoft.ReflectionAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public void SetInstanceValue<TInstance, TField>(
TInstance instance,
TField value
)
where TInstance : class
Public Sub SetInstanceValue(Of TInstance As Class, TField) (
instance As TInstance,
value As TField
)
public:
generic<typename TInstance, typename TField>
where TInstance : ref class
void SetInstanceValue(
TInstance instance,
TField value
)
member SetInstanceValue :
instance : 'TInstance *
value : 'TField -> unit when 'TInstance : not struct
- instance TInstance
- The instance that the field belongs to.
- value TField
- The value to set.
- TInstance
- The type of the instance that declares the field.
- TField
- The type of the field.