Пример #1
0
 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);
     }
 }
Пример #2
0
 public static T DeepSwap <T>(this T source) where T : struct => (T)StructExtensions.DeepSwap((object)source);