Beispiel #1
0
        // methods

        public override bool Equals(object obj)
        {
            BitArray64 array = obj as BitArray64;

            if (array == null)
            {
                return(false);
            }
            if (this.Length != array.Length)
            {
                return(false);
            }

            int index = 0;

            while (index < 10)
            {
                if (this.arr[index] != array[index])
                {
                    return(false);
                }
                index++;
            }

            return(true);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            BitArray64 arr1 = new BitArray64();
            BitArray64 arr2 = new BitArray64();
            BitArray64 arr3 = new BitArray64();

            arr1[0] = 10;
            arr1[1] = 20;
            arr2[0] = 10;
            arr2[1] = 20;

            if (arr1 == arr2)
            {
                Console.WriteLine("arr1 = arr2");
            }
            else
            {
                Console.WriteLine("arr1 != arr2");
            }


            Console.ReadKey();
        }
Beispiel #3
0
 public static bool operator !=(BitArray64 arr1, BitArray64 arr2)
 {
     return(!BitArray64.Equals(arr1, arr2));
 }