c# - Use parallel arrays for storing application settings -
i'm trying develop system uses parallel arrays align text box value , corresponding settings value.
textbox[] boxes = new textbox[] { box1, box2, box3, ... }; decimal[] values = new decimal[] { settings.default.value1, settings.default.value2, settings.default.value3, ... };
but understand arrays of primitive types passed value rather reference, actual settings values don't updated - values in array.
is there way make values
array collection of references settings values themselves? it's lot easier having like:
settings.default.value1 = decimal.parse(box1.text); settings.default.value2 = decimal.parse(box2.text); settings.default.value3 = decimal.parse(box3.text);
and other way around when you're loading values text boxes.
Comments
Post a Comment