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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -