I have this:
var lineArray = line.Split(\';\'); lineArray.ToList().ForEach(x => { if (x == \"(null)\") x = \"NULL\"; else x = string.
you can construct a new list from your original one :
var newList = lineArray.Select(x => x == "(null)" ? "NULL" : string.Format("'{0}'", x));