In C#, is it possible to declare variables in a loop? I have an array of names, and I want them all to be variables. Is there a way to create them? something like
string[] nameArray{ name, othername, anothername };
foreach ( var file in nameArray ) {
data 'file' = new data();
}