Anonymous types are read-only.
So I can't do this:
var x = new { y = 1, z = "Hello" };
x.z = "Goodbye";
However, if I have a list of anonymous variables then I could do this:
var values = File.ReadLines(path)
.Skip(1)
.Select(x => x.Split(','))
.Where(x => x[0] != string.Empty)
.Select(x => new { Period = x[0], Payout = x[4] })
.ToList();
values[0] = new { Period = values[0].Period + 1, Payout = values[0].Payout * 2 };