System.Data.ProviderBase.FieldNameLookup.GetOrdinal C# (CSharp) Method

GetOrdinal() public method

public GetOrdinal ( string fieldName ) : int
fieldName string
return int
        public int GetOrdinal(string fieldName)
        {
            if (null == fieldName)
            {
                throw ADP.ArgumentNull(nameof(fieldName));
            }
            int index = IndexOf(fieldName);
            if (-1 == index)
            {
                throw ADP.IndexOutOfRange(fieldName);
            }
            return index;
        }