Table of Contents

Method TrySetMemberValue

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

TrySetMemberValue(object?, string, object?)

Sets property or field value using the specified object type (or instance) and property name. Type of the object or the object itself must be specified.

public static bool TrySetMemberValue(object? instance, string propName, object? value)

Parameters

instance object

Instance which contains the property or field. Specify Null, for the static properties.

propName string

Property name.

value object

New property value.

Returns

bool

TrySetMemberValue(Type?, object?, string, object?)

Sets property or field value using the specified object type (or instance) and property name. Type of the object or the object itself must be specified.

public static bool TrySetMemberValue(Type? type, object? instance, string propName, object? value)

Parameters

type Type

Type of the object with the property.

instance object

Instance which contains the property or field. Specify Null, for the static properties.

propName string

Property name.

value object

New property value.

Returns

bool