public Guitar search(Guitar searchGuitar) { for (int i = 0; i < this.guitars.Count; i++) { Guitar guitar = this.guitars[i]; string builder = searchGuitar.getBuilder(); if ((builder != null) && (!builder.Equals("")) && (!builder.Equals(guitar.getBuilder()))) { continue; } // TODO : compare each property of the guitar return guitar; } return null; }
public Guitar search(Guitar searchGuitar) { for (int i = 0; i < this.guitars.Count; i++) { Guitar guitar = this.guitars[i]; string builder = searchGuitar.getBuilder(); if ((builder != null) && (!builder.Equals("")) && (!builder.Equals(guitar.getBuilder()))) { continue; } // TODO : compare each property of the guitar return(guitar); } return(null); }
private void displaySorryMessage(Guitar guitar) { string sorryMsg = String.Format("Not found guitar build from {0}.", guitar.getBuilder()); MessageBox.Show(sorryMsg); }