ArrayTools.cs 462 B

12345678910111213141516
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Veldrid.Common.Tools
  6. {
  7. internal static class ArrayTools
  8. {
  9. public static Boolean Equals<T>(this T[] oldvalue, T[] newvalue)
  10. {
  11. if (newvalue == null || newvalue.Length != oldvalue.Length) return false;
  12. return !Enumerable.Range(0, oldvalue.Length).Any(x => !Object.Equals(oldvalue[x], newvalue[x]));
  13. }
  14. }
  15. }