PropertyAccessorSetInstanceValueTInstance, TProperty(TInstance, TProperty) Method
Sets 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 void SetInstanceValue<TInstance, TProperty>(
in TInstance instance,
TProperty value
)
where TInstance : struct, new()
Public Sub SetInstanceValue(Of TInstance As {Structure, New}, TProperty) (
ByRef instance As TInstance,
value As TProperty
)
public:
generic<typename TInstance, typename TProperty>
where TInstance : value class, gcnew()
void SetInstanceValue(
[InAttribute] TInstance% instance,
TProperty value
)
member SetInstanceValue :
instance : 'TInstance byref *
value : 'TProperty -> unit when 'TInstance : struct, new()
- 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.