PropertyAccessorSet(Object, Object, Object) Method

Sets the property with one index parameter. For static properties the instance parameter is omitted (can be ).
See the Remarks section of the Set(Object, Object, Object) overload for details.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public void Set(
	Object? instance,
	Object? value,
	Object? index
)

Parameters

instance  Object
The instance that the property belongs to. Can be for static properties.
value  Object
The value to set.
index  Object
The value of the index.

Exceptions

ArgumentNullExceptionThis PropertyAccessor represents an instance property and instance is
-or-
This PropertyAccessor represents a value type property and value is .
ArgumentExceptionThe type of instance, value or index is invalid.
-or-
The property cannot be accessed with one index parameter.
InvalidOperationExceptionThe PropertyAccessor represents a property of an open generic type.
NotSupportedExceptionThis PropertyAccessor represents a read-only property.
-or-
On .NET Framework the code is executed in a partially trusted domain with insufficient permissions.
PlatformNotSupportedExceptionYou use the .NET Standard 2.0 build of KGySoft.CoreLibraries and this PropertyAccessor represents a ref property.

See Also