public int CompareTo(Call anotherCall) { if (anotherCall == null) { return(1); } if (ReferenceEquals(this, anotherCall)) { return(0); } if (this.GetType() != anotherCall.GetType()) { throw new ArgumentException("A Call instance was expected.", "anotherCall"); } if (CallTime.CompareTo(anotherCall.CallTime) != 0) { return((-1) * CallTime.CompareTo(anotherCall.CallTime)); } else { return(0); } }