Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static bool ArrayEquals<T>(T[] arr1, T[] arr2)
- {
- if (Object.ReferenceEquals(arr1, arr2))
- {
- return true;
- }
- if (arr1.Length != arr2.Length)
- {
- return false;
- }
- for (int i = 0; i < arr1.Length; i++)
- {
- if (!arr1[i].Equals(arr2[i]))
- {
- return false;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement