int indexOfField(string fieldname);

The function indexOfField() returns a number of field with a particular name.
If there is no field with such name, it returns -1.

If fields names contain non-ASCII symbols, you have to use a similar function and provide a code page:
int indexOfField(string fieldname, EncodingInfo e);


{
    // your code
    int field = dbf.indexOfField("FIRSTNAME");
    if ( field >= 0 )
    {
        // your code
    }
}