Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.2.9-preview-600" />

 Swap

static class Swap
public static bool SwapValue<T1, T2, T3, T4, TValue>(ref TValue refValue, Func<T1, T2, T3, T4, TValue, TValue> valueFactory, T1 t1, T2 t2, T3 t3, T4 t4)