Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //string filePath = @"C:\Users\verag\source\.NET course\Week7_HomeWork\Week7\Week7\";
            //string fileName = "Program.cs";
            //PrintFileContent(filePath, fileName);
            //--------------------------------------------------------------------------
            //string link = "https://wantsome.ro/wp-content/uploads/2019/08/WWantsome_Logo_Light1_03-1.png";
            //string fileName = "poza1.png";
            //DownloadInternetFile(link, fileName);
            //---------------------------------------------------------------------------
            //EnterNumbers(1, 100);
            //---------------------------------------------------------------------------


            BitArray64 simpleBitArray1 = new BitArray64(45445);

            foreach (var bit in simpleBitArray1)
            {
                Console.Write(bit);
            }
            simpleBitArray1[1] = 1;

            Console.WriteLine();
            foreach (var bit in simpleBitArray1)
            {
                Console.Write(bit);
            }

            Console.WriteLine();
            BitArray64 simpleBitArray2 = new BitArray64(25544);

            foreach (var bit in simpleBitArray2)
            {
                Console.Write(bit);
            }

            Console.WriteLine();
            Console.WriteLine(simpleBitArray1.Equals(simpleBitArray2));
            Console.WriteLine();

            Console.WriteLine(simpleBitArray1.GetHashCode());
            Console.WriteLine(simpleBitArray1[2] == simpleBitArray2[2]);



            Console.WriteLine();
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            BitArray64 x = obj as BitArray64;

            return(this.state.Equals(x.state));
        }