Say I have a class who's constructor takes its values from data read from a file, is it also possible to create an instance of that class with a name from a string. That way I can create an instance of a class for each file I open and the constructor can be automatically loaded.
//User chooses file to open
//Read ChocolateCake.txt values
string className = Path.GetFileName(path);
//code to remove .txt
//Instance name is taken from className
Cake "ChocolateCake" = new Cake(ingredient1, ingredient2, etc);
How would I create an instance of Cake with the name of the file I have read?