Collapse All Expand All Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: JavaScript

Visual Basic
C#
Visual C++
JavaScript

Easy GIS .NET API Reference
DbfReader..::.GetField Method
DbfReader Class See Also Send Feedback

returns a string representing the field[fieldIndex] of the Record[recordNumber] in the dbf file Throws ArgumentException if recordNumber ">=" NumberOfRecords or negative, fieldIndex >= FieldCount or negative,

Namespace: EGIS.ShapeFileLib
Assembly: EGIS.ShapeFileLib (in EGIS.ShapeFileLib.dll)

# Syntax

Visual Basic (Declaration)
    Public Function GetField ( _
    	recordNumber As Integer, _
    	fieldIndex As Integer _
    ) As String

C#
    public string GetField(
    	int recordNumber,
    	int fieldIndex
    )

Visual C++
    public:
    String^ GetField(
    	int recordNumber,
    	int fieldIndex
    )

#### Parameters

recordNumber
  Type: System..::.Int32
  Zero based record number in the dbf file

fieldIndex
  Type: System..::.Int32
  Zero based field index in a record

#### Return Value

the string contents of the required field. Note that the returned string is not trimmed so that if a field length is longer than the stored string then the string is padded with spaces. I.E if a field of length 10 is storing "abc" then the returned string will be padded with 7 space characters

# See Also

DbfReader Class
EGIS.ShapeFileLib Namespace