PropertyAccessorSetInstanceValueTInstance, TProperty(TInstance, TProperty) Method
Sets the strongly typed value of a non-indexed instance property in a reference 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 void SetInstanceValue<TInstance, TProperty>(
TInstance instance,
TProperty value
)
where TInstance : class
Public Sub SetInstanceValue(Of TInstance As Class, TProperty) (
instance As TInstance,
value As TProperty
)
public:
generic<typename TInstance, typename TProperty>
where TInstance : ref class
void SetInstanceValue(
TInstance instance,
TProperty value
)
member SetInstanceValue :
instance : 'TInstance *
value : 'TProperty -> unit when 'TInstance : not struct
- instance TInstance
- The instance that the property belongs to.
- value TProperty
- The value to set.
- TInstance
- The type of the instance that declares the property.
- TProperty
- The type of the property.