Obviously you can’t create a member of a class like this
string name = "member-";
for(int i=0;i<5;i++)
{
classname name+i.toString() = new classname();
}
I don’t understand why and is there a good workaround?
What If I need to create several members?
This looks like the perfect case to use a
Dictionary<string, classname>: