Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.4.0-preview-602" />

 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)