Android.Database.ICursor.GetColumnIndex Method
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.

Syntax

[Android.Runtime.Register("getColumnIndex", "(Ljava/lang/String;)I", "GetGetColumnIndex_Ljava_lang_String_Handler:Android.Database.ICursorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetColumnIndex (string columnName)

See Also

ICursor.GetColumnIndexOrThrow(string)

Parameters

columnName
the name of the target column.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the zero-based index for the given column name, or -1 if the column doesn't exist. If you expect the column to exist use ICursor.GetColumnIndexOrThrow(string) instead, which will make the error more clear.

[Android Documentation]

Requirements

Namespace: Android.Database
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1