public override bool Equals(object obj) { var otherLocation = obj as Location; return(otherLocation != null && File.Equals(otherLocation.File) && StartLine == otherLocation.StartLine && StartColumn == otherLocation.StartColumn && EndLine == otherLocation.EndLine && EndColumn == otherLocation.EndColumn); }