Peter Gent

Peter Gent

  • NA
  • 35
  • 0

How to create an object whose name is variable

Jun 3 2009 8:22 PM
I am trying to create a several different dictionary lists that will all be created inside of a loop, so I am trying to send in a variable to give each one a different name

I am looking for something that is a kind of like this (this does not work though)

for (int i=0; i< list.Count; i==)
{
        // this is where the name would look different depending on the amount of times through the loop
        DictionaryList<string> [i].ToString = new DictionaryList<string>();
}

Answers (2)