Description: The AreArraysEquivalent method in C# checks if two arrays are equivalent or not, i.e., if they have the same length and the elements in both arrays are the same irrespective of order.
if (areEqual) { Console.WriteLine("The arrays are equivalent"); } else { Console.WriteLine("The arrays are not equivalent"); }
In this example, we have two arrays array1 and array2. The AreArraysEquivalent method will take both arrays and compare them to check if they are equivalent. Here, the output will be "The arrays are equivalent" as both arrays have the same elements irrespective of order.
Package Library: System.Linq.
C# (CSharp) Aver.AreArraysEquivalent - 24 examples found. These are the top rated real world C# (CSharp) examples of Aver.AreArraysEquivalent extracted from open source projects. You can rate examples to help us improve the quality of examples.