GetOrdinal Method
See Also 
SourceCode.SmartObjects.Client Namespace > SmartObjectReader Class : GetOrdinal Method



name
The name of the column.

Glossary Item Box

Gets the column ordinal given the name of the column.

Syntax

Visual Basic (Declaration) 
Public Overrides Function GetOrdinal( _
   ByVal name As String _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As SmartObjectReader
Dim name As String
Dim value As Integer
 
value = instance.GetOrdinal(name)
C# 
public override int GetOrdinal( 
   string name
)
C++/CLI 
public:
int GetOrdinal( 
   String^ name
) override 

Parameters

name
The name of the column.

Return Value

The zero-based column ordinal.

Exceptions

ExceptionDescription
System.IndexOutOfRangeExceptionThe name specified is not a valid column name.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also