Cobol can create different types of files - fix length or variable length or so called VSAM files.
Fields in the file can be defined as Characters (string in C#) or numeric.
Numeric can be different types - signed or unsigned, COMP-3 (signed of unsigned), COMP (signed or unsigned) and some other not often use types.
On the Mainframe files can be created as ASCII or EBCDIC.
If you file has only text field it look pretty simple.
Lets assume in cobol you have:
01 record.
03 first-name pic x(20).
03 last-name pic x(30).
03 address pic x(10).
in C#:
using (StreamReader sr = new StreamReader(filePaths, System.Text.Encoding.ASCII))
{
String w_line;
while ((w_line = sr.ReadLine())!= null)
{
string firstName = w_line.Substring(0,20) ;
string lasttName = w_line.Substring(20,30) ;
string address = w_line.Substring(50,10) ;
zb