Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1450 comment equals #1451

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

b0bi79
Copy link
Member

@b0bi79 b0bi79 commented May 31, 2020

Fixes #1450

Copy link
Member

@igitur igitur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And please add test cases.

@@ -169,7 +169,7 @@ public bool Equals(IXLFormattedText<T> other)

for (Int32 i = 0; i < count; i++)
{
if (_richTexts.ElementAt(i) != other.ElementAt(i))
if (_richTexts.ElementAt(i).Equals(other.ElementAt(i)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the == and != operators not be overloaded to avoid this situation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it's a good practice to have a consistent behavior between Equals and ==

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible NRE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The copied Comment is not equal to the original by Equal method
4 participants