I'm trying to create a loop that will create some variable as it goes through and then add the variables to an array. I want to name the variables created based on their position in the array, something like this;
now obviosuly this isn't working since name is used more than once, but is there a work around that someone could suggest? even a way of ranbomly generateing some names may work, but I'm not sure as the program will need to be able to call these names later. I wont need to know them, but the program will.Code:for (int i = 0; i < 5; i++) { string name = i.ToString(); Nmode name; wallarray[i] = name = new Nmode(Content); name.NLoad }
Thanks in advance for any help
ES



LinkBack URL
About LinkBacks


