DASObject dfsa = new DASObject();
if (line.Substring(0, 1) == "P")
{
someObject.par= true;
}
Should be re-written as:
DASObject dfsa = new DASObject();
if (!string.IsEmptyOrNull(line) && line.Substring(0, 1) == "P")
{
someObject.par= true;
}
Which will take care of the line being a null value or if it is empty. Otherwise your first "if" statement is assuming that the line contains something. Your data file has blank lines and blank lines can't be sub-string'ed.