I have this:
var lineArray = line.Split(\';\'); lineArray.ToList().ForEach(x => { if (x == \"(null)\") x = \"NULL\"; else x = string.
don't use ForEach like that - use a for loop.
ForEach
for
for (int i = 0; i < lineArray.Length; i++) { if (lineArray[i] == "(null)") lineArray[i] = "NULL"; else lineArray[i] = string.Format("'{0}'", lineArray[i]); }