Table of Contents

Alter Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/ObjectExtensions.cs

Alter<T>(T, Action<T>)

Adjust the specified value with the modifier delegate.

public static T Alter<T>(this T value, Action<T> modifier)

Parameters

value T

The value to adjust.

modifier Action<T>

The delegate that will adjust the specified value.

Returns

T

The value in its original or adjusted form.

Type Parameters

T

The type of the value to adjust.

Remarks

This is thought to be a more relaxed change than the one provided by Adjust<T>(T, Func<T, T>) (e.g., applying changes only to the current value).