public class Book
{
//作者
public string author {
get; set;}//标题
public string Title {
get; set;}//发布时间
public DateTime Published {
get; set;}
public Book(string title,DateTime dateTime,string name){
this.Title = title;
this.Published = dateTime;
this.author = name;}
public Book(){
}}
2.写入数据
Console.WriteLine("********LINQ:获取不重复的数据-Distinct 方法***********");
Book book6 = new Book("肖申克救赎2", new DateTime(2001,7,14),"弗兰克");
Book book1 = new Book("哈利波特", new DateTime(1997,7,14),"Mari");
Book book2 = new Book