You did not tell us where the error occurs, but I am assuming it is at the lines:
split_data_F = line_f.Split (new string[] {"\t"}, StringSplitOptions.RemoveEmptyEntries);
if (split_data_F [3].Equals ("NaN"))
continue;
You are making the assumption that the
Split
command will return at least 4 items, but what if it does not, or does not return anything? You need to check that
split_data_F
is not
null
, and also how many elements it contains. Never assume that the data will be valid.