I'm trying to create a method that names a variable based on a specific set of other variables. For example, I want to create series of Lists (i.e., List1, List2, List3) by named according to two variables. For example:
string l = "List"
int += 1
Such that as I cycled through the code using a foreach
loop it would name each List consecutively. Any ideas? I've only gotten this much "correct" so far and its not much:
public static string[] ListRenamer(List<string> list, int num)
{
string x = list.ToString();
string y = num.ToString();
string[] z = new string[1];
return z;
}