I have three data structures,
Tuple<string, string> parentid = null;
var subids = new List<Tuple<int, int>>();
Tuple<string, string> dname = null;
ArrayList al = new ArrayList();
al.add(parentid);
al.add(subids);
al.add(dname);
and I call a function which returns an ArrayList containing those 3 data structures.
For example
ArrayList al = category.getTree();
and now I want to pass the data structure to another method
string option = category.printOption(al[0], al[1], al[2], 0);
The printOption code:
public string printOption(Tuple<string, string> parents, List<Tuple<int, int>> subids, Tuple<string, string> dname, int indent)
But there is an error :
the best overloading method…….
Anyone know what the problem is?
ArrayListstores objects, so to use the contents you will need to cast each object you want to use to its correct type: