Mega Code Archive

 
Categories / C# / Collections Data Structure
 

Are thos two arrays having the save contents

//http://www.bouncycastle.org/ //MIT X11 License using System; using System.Text; namespace Org.BouncyCastle.Utilities {     /// <summary> General array utilities.</summary>     public sealed class Arrays     {     private static bool HaveSameContents(byte[]  a,byte[]  b)     {       if (a.Length != b.Length)         return false;       for (int i = 0; i < a.Length; i++)       {         if (a[i] != b[i])           return false;       }       return true;     }     private static bool HaveSameContents(int[] a,int[]  b)     {       if (a.Length != b.Length)         return false;       for (int i = 0; i < a.Length; i++)       {         if (a[i] != b[i])           return false;       }       return true;     }     } }