public bool Search(string searchQuery) { if (Title.Contains(searchQuery) || Autor.Contains(searchQuery) || ISBN.Contains(searchQuery)) { return(true); } return(false); }
/// <summary> /// Check if this books matchs with the given search query. It will use all relevant informations of this book. /// </summary> /// <param name="searchQuery">the search query</param> /// <returns>true if this book matchs</returns> public override bool Search(string searchQuery) { // Take the preimplemented method "Search" to test the given members of the base class. if (base.Search(searchQuery) || Autor.Contains(searchQuery) || ISBN.Contains(searchQuery)) { return(true); } return(false); }