System.Data.DataRowView.Equals C# (CSharp) 메소드

Equals() 공개 메소드

Checks for same reference instead of equivalent DataView or Row. Necessary for ListChanged event handlers to use data structures that use the default to object.Equals(object) instead of object.ReferenceEquals to understand if they need to add a PropertyChanged event handler.
public Equals ( object other ) : bool
other object
리턴 bool
        public override bool Equals(object other) => ReferenceEquals(this, other);

Usage Example

예제 #1
0
        public override bool Equals(DataView dv)
        {
            RelatedView other = dv as RelatedView;

            if (other == null)
            {
                return(false);
            }
            if (!base.Equals(dv))
            {
                return(false);
            }
            if (_filterValues != null)
            {
                return(CompareArray(_childKey.ColumnsReference, other._childKey.ColumnsReference) && CompareArray(_filterValues, other._filterValues));
            }
            else
            {
                if (other._filterValues != null)
                {
                    return(false);
                }

                return(CompareArray(_childKey.ColumnsReference, other._childKey.ColumnsReference) &&
                       CompareArray(_parentKey.Value.ColumnsReference, _parentKey.Value.ColumnsReference) &&
                       _parentRowView.Equals(other._parentRowView));
            }
        }