I’m trying to read some information from a text file and put in a String[]
I read from the file succesfully, but when I try to put the information in the String[], I get this error :”object reference not set to an instance of an object”. This is the code where I get the error:
string total = linie.Replace(idCont + "_" + rows["JOB"].ToString() + "_" + Loturi[i] + " : ", "")
Vol_Plicuri[i] = total.Split('|')[0].Trim();
I don’t know how to get bypass this error.
Thanks!
Make sure that
Vol_Plicuriis set to a non-null value.