Hey!
I'm currently at the end of a task im working on, which consist of a class named CD, and in the main program i got a method which register a CD. And i want the created class to be named CD1, CD2 etc.
public static int cdNumber = 1;
static void RegisterANewCD()
{
string name = "CD" + cdNumber;
CD name = new CD();
cdNumber++;
}
This clearly doesnt work since i cant name class object like that. What should I do?
Asotop.