System.Data.DataTable.SetCaseSensitiveValue C# (CSharp) Method

SetCaseSensitiveValue() private method

private SetCaseSensitiveValue ( bool isCaseSensitive, bool userSet, bool resetIndexes ) : bool
isCaseSensitive bool
userSet bool
resetIndexes bool
return bool
        internal bool SetCaseSensitiveValue(bool isCaseSensitive, bool userSet, bool resetIndexes)
        {
            if (userSet || (!_caseSensitiveUserSet && (_caseSensitive != isCaseSensitive)))
            {
                _caseSensitive = isCaseSensitive;
                if (isCaseSensitive)
                {
                    _compareFlags = CompareOptions.None;
                }
                else
                {
                    _compareFlags = CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth;
                }
                if (resetIndexes)
                {
                    ResetIndexes();
                    foreach (Constraint constraint in Constraints)
                    {
                        constraint.CheckConstraint();
                    }
                }
                return true;
            }
            return false;
        }

Usage Example

 public void Add(DataTable table)
 {
     IntPtr ptr;
     Bid.ScopeEnter(out ptr, "<ds.DataTableCollection.Add|API> %d#, table=%d\n", this.ObjectID, (table != null) ? table.ObjectID : 0);
     try
     {
         this.OnCollectionChanging(new CollectionChangeEventArgs(CollectionChangeAction.Add, table));
         this.BaseAdd(table);
         this.ArrayAdd(table);
         if (table.SetLocaleValue(this.dataSet.Locale, false, false) || table.SetCaseSensitiveValue(this.dataSet.CaseSensitive, false, false))
         {
             table.ResetIndexes();
         }
         this.OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Add, table));
     }
     finally
     {
         Bid.ScopeLeave(ref ptr);
     }
 }
All Usage Examples Of System.Data.DataTable::SetCaseSensitiveValue
DataTable