Esempio n. 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);
     }
 }
Esempio n. 2
0
 public static T DeepSwap <T>(this T source) where T : struct => (T)StructExtensions.DeepSwap((object)source);