Example #1
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Piano otherFlute = (Piano)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   PianoBrand.CompareTo(otherFlute.PianoBrand) +
                   PianoType.CompareTo(otherFlute.PianoType));
        }
Example #2
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Guitar otherFlute = (Guitar)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   GuitarBrand.CompareTo(otherFlute.GuitarBrand) +
                   GuitarType.CompareTo(otherFlute.GuitarType));
        }
Example #3
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Flute otherFlute = (Flute)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   FluteBrand.CompareTo(otherFlute.FluteBrand) +
                   Material.CompareTo(otherFlute.Material) +
                   FluteType.CompareTo(otherFlute.FluteType));
        }