Skip to main content

SetPropertyHelper.Set<T>(ref T, T, Action) Method

Updates the field value if the new value is different. The method invokes the specified callback if the field value changes.

Namespace: DevExpress.Maui.Mvvm

Assembly: DevExpress.Maui.Mvvm.dll

NuGet Package: DevExpress.Maui.Mvvm

Declaration

public static bool Set<T>(
    ref T storage,
    T value,
    Action changedCallback
)

Parameters

Name Type Description
storage T

A reference to the target field.

value T

The new field value.

changedCallback Action

A callback that invokes if the value updates in the storage.

Type Parameters

Name Description
T

The type of the target field.

Returns

Type Description
Boolean

true if the method updates the field value in the storage; otherwise, false.

See Also