public int CompareTo(Object obj) { if (obj == null) { return(1); } PollingPlace otherPollingPlace = obj as PollingPlace; if (otherPollingPlace != null) { return(LocationName.CompareTo(otherPollingPlace.LocationName)); } else { throw new ArgumentException("Argument is not a PollingPlace."); } }