I want to give an object a name that's changes all the time. I have a foreach in which I set a pushpin. Each time there is being looped through the foreach, I want there to be a new name based on whats in my list (I'm looping through my list).
for example, this is my code:
Test test = new Test();
foreach (var test in Test.allTests)
{
Pushpin pushpin = new Pushpin();
}
I want to do something like this:
Test test = new Test();
foreach (var test in Test.allTests)
{
Pushpin test.testname = new Pushpin();
}
I am unable to do this, because test.testname is a string..