System.Data.DataColumnCollection.IndexOfCaseInsensitive C# (CSharp) Method

IndexOfCaseInsensitive() private method

private IndexOfCaseInsensitive ( string name ) : int
name string
return int
        internal int IndexOfCaseInsensitive(string name)
        {
            int hashcode = _table.GetSpecialHashCode(name);
            int cachedI = -1;
            DataColumn column = null;
            for (int i = 0; i < Count; i++)
            {
                column = (DataColumn)_list[i];
                if ((hashcode == 0 || column._hashCode == 0 || column._hashCode == hashcode) &&
                   NamesEqual(column.ColumnName, name, false, _table.Locale) != 0)
                {
                    if (cachedI == -1)
                    {
                        cachedI = i;
                    }
                    else
                    {
                        return -2;
                    }
                }
            }
            return cachedI;
        }