예제 #1
0
 /// <summary>Checks if two slices are equal.</summary>
 /// <param name="x">Slice compared with <paramref name="y"/></param>
 /// <param name="y">Slice compared with <paramref name="x"/></param>
 /// <returns>true if <paramref name="x"/> and <paramref name="y"/> have the same size and contain the same sequence of bytes; otherwise, false.</returns>
 public bool Equals(Slice x, Slice y)
 {
     return(x.Count == y.Count && UnsafeHelpers.SameBytes(x.Array, x.Offset, y.Array, y.Offset, y.Count));
 }