using System.Collections.Generic;
public string Name {get; set;}
public string Type {get; set;}
public static void Main()
var dogs = new HashSet<Dog> {
new Dog() {Name = "Z", Type = "Beagle" },
new Dog() {Name = "A", Type = "Beagle" },
new Dog() {Name = "Q", Type = "Beagle" },
new Dog() {Name = "B", Type = "Husky" },
new Dog() {Name = "C", Type = "Poodle" },
new Dog() {Name = "D", Type = "Greyhound" },
var results = (from d in dogs select d).Distinct().ToList();
foreach(Dog d in results) {
Console.WriteLine(d.Name);