public int CompareTo(object obj) { if (obj == null) { return(1); } if (!(obj is SourceLocation)) { throw ExceptionBuilder.ArgumentMustBeOfType("obj", typeof(SourceLocation)); } SourceLocation location = (SourceLocation)obj; return(CompareTo(location)); }