using System.Collections.Generic;
public static void Main()
HashSet<Question> qh = new HashSet<Question>();
for (int i = 0; i < qh.Count(); i++)
Console.WriteLine(qh.ElementAt(i).ID);
public override int GetHashCode()
public override bool Equals(System.Object obj)
return (obj != null && obj.GetType() == typeof (Question)) ? (this.ID == ((Question)(obj)).ID) : false;