Exemple #1
0
 public static void IsEqual(this ArraySegment <int> @this, ArraySegment <int> other, bool isSamePlatform)
 {
     Assert.True((@this.Array != null) == (other.Array != null));
     Assert.Equal(@this.Count, other.Count);
     Assert.Equal(@this.Offset, other.Offset);
     if (@this.Array != null)
     {
         @this.CheckSequenceEquals(other, isSamePlatform);
     }
 }
        public static bool IsEqual(this ArraySegment <int> @this, ArraySegment <int> other)
        {
            if (!((@this.Array != null) == (other.Array != null) &&
                  @this.Count == other.Count &&
                  @this.Offset == other.Offset))
            {
                return(false);
            }

            return(@this.Array == null || @this.CheckSequenceEquals(other));
        }