How to set value of variable whose name is determinated at run-time?

Maybe this helps: