Exemplo n.º 1
0
 /// <summary>
 /// Method used to see current book's tag value
 /// </summary>
 /// <param name="book"> Current book </param>
 /// <param name="prop"> Property name </param>
 /// <returns> Tag value </returns>
 public object Tag(Book book, string prop)
 {
     return(book.GetType().GetProperty(prop).GetValue(book));
 }
 public string ToString(Book b)
 {
     return(string.Format("{0} record: {1}, {2}", b.GetType().Name, b.Author, b.Title));
 }