Here I just got a scene like : here what i am doing is i am declaring 5 string variables and assiging null , two arrays out of which 1st array has got the list of string variable name and 2nd array containing the values which needs to be assigned to the 5 string variables declared as below :
string slot1=null,slot2=null,slot3=null,slot4=null,slot5=null;
string[] a=new string[5]{slot1,slot2,slot3,slot4,slot5};
string[] b=new string[5]{abc,def,ghi,jkl,mno};
for(int i=0;i<a.length;i++)
{
//here i want to do is dynamically find the variable (for ex. slot1) or you can say a[i] and assign the value from b[i] (for ex. abc) to it.
}
how to implement this ?????