Public Function get_row_index(ByVal field_item As String, ByVal tbl_name As String, ByVal fieldname As String) As Integer

ds.Tables(tbl_name).PrimaryKey = New DataColumn() {ds.Tables(tbl_name).Columns(fieldname)}
Dim foundrow As DataRow
foundrow = ds.Tables(tbl_name).Rows.Find(field_item)
For i As Integer = 0 To ds.Tables(tbl_name).Rows.Count - 1
If ds.Tables(tbl_name).Rows(i).Equals(foundrow) Then
get_row_index = i
Exit For
End If
Next
end function

I need to get the index of the field_item. Is it the right way?