/// <summary> /// </summary> public override int GetOrdinal(string name) { if (null == _fieldNameLookup) { _fieldNameLookup = new FieldNameLookup(this, -1); } return(_fieldNameLookup.GetOrdinal(name)); }
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/GetOrdinal/*' /> public virtual int GetOrdinal(string name) { if (_fieldNameLookup == null) { string[] names = new string[FieldCount]; for (int i = 0; i < names.Length; i++) { names[i] = GetSqlMetaData(i).Name; } _fieldNameLookup = new FieldNameLookup(names, -1); } return(_fieldNameLookup.GetOrdinal(name)); }
public virtual int GetOrdinal(string name) { EnsureSubclassOverride(); if (null == _fieldNameLookup) { string[] names = new string[FieldCount]; for (int i = 0; i < names.Length; i++) { names[i] = GetSqlMetaData(i).Name; } _fieldNameLookup = new FieldNameLookup(names, -1); } return(_fieldNameLookup.GetOrdinal(name)); }