This previous link shows how to connect
to VFP from C#. That answer actually shows connection with OleDbProvider which is similar to answer by DaveB, however, VFP is NOT SQLServer connection and uses VFP OleDbProvider which is available at Microsoft's website for VFP
Used in conjunction with each other (connecting to VFP OleDB) and running query. The connection string only needs to point to the physical path where the data resides, and can query from any .dbf in that folder. You do not have to explicitly connect to an actual "database" as VFP implies a path IS the location of the database.
Anyhow, the other question, joined with Dave should be able to get your data available and write it to a stream. The only other caveat is that the file stream that you are writing too, make sure its a binary file. Otherwise, anytime you write a byte that is an {enter} key, might be forced written with a trailing {line feed}. I found that one out the hard way a long time ago writing binary image files when building 2d bar codes and it getting messed up.