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)); }
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)); }
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)); }