Beispiel #1
0
        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            Compte converti = obj as Compte;

            return(Numero.Equals(converti.Numero) && Proprietaire.Equals(converti.Proprietaire) &&
                   Solde.Equals(converti.Solde));
        }
        // override object.Equals
        public override bool Equals(object obj)
        {
            //
            // See the full list of guidelines at
            //   http://go.microsoft.com/fwlink/?LinkID=85237
            // and also the guidance for operator== at
            //   http://go.microsoft.com/fwlink/?LinkId=85238
            //

            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            // TODO: write your implementation of Equals() here
            Compte converti = obj as Compte;

            return(Numero.Equals(converti.Numero) &&
                   Solde.Equals(converti.Solde) &&
                   Proprietaire.Equals(converti.Proprietaire));
        }