Note
If a matching indexed property could be found and the invocation itself has thrown an exception, then this method also throws an exception instead of returning .
public static bool TrySetIndexedMember(
Object instance,
Object? value,
params Object?[] indexParameters
)
Public Shared Function TrySetIndexedMember (
instance As Object,
value As Object,
ParamArray indexParameters As Object()
) As Boolean
public:
static bool TrySetIndexedMember(
Object^ instance,
Object^ value,
... array<Object^>^ indexParameters
)
static member TrySetIndexedMember :
instance : Object *
value : Object *
indexParameters : Object[] -> bool
This method ignores explicitly implemented interface properties.
If you already have a PropertyInfo instance of the indexed property, then use the SetProperty(Object, PropertyInfo, Object, ReflectionWays, Object) method for better performance.
For setting an indexed property this method uses the DynamicDelegate reflection way.