System.Data.DataKey.ColumnsEqual C# (CSharp) Method

ColumnsEqual() private method

private ColumnsEqual ( DataKey key ) : bool
key DataKey
return bool
        internal bool ColumnsEqual(DataKey key) => ColumnsEqual(_columns, key._columns);

Same methods

DataKey::ColumnsEqual ( DataColumn column1, DataColumn column2 ) : bool

Usage Example

Beispiel #1
0
        // If we're not in a DataSet relations collection, we need to verify on every property get that we're
        // still a good relation object.
        internal override void CheckState()
        {
            if (_DataSet == null)
            {
                // Make sure columns arrays are valid
                parentKey.CheckState();
                childKey.CheckState();

                if (parentKey.Table.DataSet != childKey.Table.DataSet)
                {
                    throw ExceptionBuilder.TablesInDifferentSets();
                }

                for (int i = 0; i < parentKey.Columns.Length; i++)
                {
                    if (parentKey.Columns[i].DataType != childKey.Columns[i].DataType)
                    {
                        throw ExceptionBuilder.ColumnsTypeMismatch();
                    }
                }

                if (childKey.ColumnsEqual(parentKey))
                {
                    throw ExceptionBuilder.KeyColumnsIdentical();
                }
            }
        }
All Usage Examples Of System.Data.DataKey::ColumnsEqual