Gets the column ordinal, given the name of the column.
Assembly: System.Data (in System.Data.dll)
performs a case-sensitive lookup first. If it fails, a second case-insensitive search is made. The method throws an IndexOutOfRange exception if the zero-based column ordinal is not found.
is kana-width insensitive.
Because ordinal-based lookups are more efficient than named lookups, it is inefficient to call within a loop. Save time by calling one time and assigning the results to an integer variable for use within the loop.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.