@@ -352,18 +352,18 @@ public static void Copy(Array sourceArray, long sourceIndex, Array destinationAr
352352 Copy ( sourceArray , isourceIndex , destinationArray , idestinationIndex , ilength ) ;
353353 }
354354
355+ #if ! MONO // implementation details of MethodTable
356+
355357 // Provides a strong exception guarantee - either it succeeds, or
356358 // it throws an exception with no side effects. The arrays must be
357359 // compatible array types based on the array element type - this
358360 // method does not support casting, boxing, or primitive widening.
359361 // It will up-cast, assuming the array types are correct.
360362 public static void ConstrainedCopy ( Array sourceArray , int sourceIndex , Array destinationArray , int destinationIndex , int length )
361363 {
362- CopyImpl ( sourceArray , sourceIndex , destinationArray , destinationIndex , length , reliable : true ) ;
364+ Copy ( sourceArray , sourceIndex , destinationArray , destinationIndex , length , reliable : true ) ;
363365 }
364366
365- #if ! MONO // implementation details of MethodTable
366-
367367 // Copies length elements from sourceArray, starting at index 0, to
368368 // destinationArray, starting at index 0.
369369 public static unsafe void Copy ( Array sourceArray , Array destinationArray , int length )
@@ -396,7 +396,12 @@ public static unsafe void Copy(Array sourceArray, Array destinationArray, int le
396396
397397 // Copies length elements from sourceArray, starting at sourceIndex, to
398398 // destinationArray, starting at destinationIndex.
399- public static unsafe void Copy ( Array sourceArray , int sourceIndex , Array destinationArray , int destinationIndex , int length )
399+ public static void Copy ( Array sourceArray , int sourceIndex , Array destinationArray , int destinationIndex , int length )
400+ {
401+ Copy ( sourceArray , sourceIndex , destinationArray , destinationIndex , length , reliable : false ) ;
402+ }
403+
404+ private static unsafe void Copy ( Array sourceArray , int sourceIndex , Array destinationArray , int destinationIndex , int length , bool reliable )
400405 {
401406 if ( sourceArray != null && destinationArray != null )
402407 {
@@ -423,7 +428,7 @@ public static unsafe void Copy(Array sourceArray, int sourceIndex, Array destina
423428 }
424429
425430 // Less common
426- CopyImpl ( sourceArray , sourceIndex , destinationArray , destinationIndex , length , reliable : false ) ;
431+ CopyImpl ( sourceArray , sourceIndex , destinationArray , destinationIndex , length , reliable ) ;
427432 }
428433
429434 // Reliability-wise, this method will either possibly corrupt your
0 commit comments