List<object> objects = new List<object>();
objects.Add(5);
I want to do
objects[0] += 10;
But I need to cast it first.
int a = (int) objects[0];
a += 10;
But doing this only changes a, not the integer in the list.
What’s the best way to solve this?
You could do