Hello,
I am trying to declare a 2D List Globally. I beleive I miss something out in my declaration.
It seems that I can declare the list. But when I try to add 1 dimension to the list, it only
accepts: "new Requests.GlobalVariables.list2()"
when it should be: new Requests.GlobalVariables.list1()
I wonder what I can be doing wrong?
//Global declaration
public class list1 : List<int> { };
public class list2 : List<list1> { };
private static List<list2> _list;
public static List<list2> list
{
get { return _list; }
set { _list = value; }
}
Requests.GlobalVariables.list = new List<Requests.GlobalVariables.list2>(); //Declare
Requests.GlobalVariables.list.Add(new Requests.GlobalVariables.list1()); //Add 1 dimension element