private static void CallRecursiveDeepSwapOnElementsOf(Array array) { for (int index = 0; index < array.Length; ++index) { object source = array.GetValue(index); array.SetValue(StructExtensions.DeepSwap(source), index); } }
public static T DeepSwap <T>(this T source) where T : struct => (T)StructExtensions.DeepSwap((object)source);