i have managed to get it working, thanks to your help however now a new problem has spawned.
if i go (from another class)
instanceofMyClass.methodName();
where the method is supposed to return list
however i am left wiht the myClass.methodName, but no way to get the data from it, when i changed the method to return int or string it works fine, simply inputting into a msgbox. however i seem unable to extract that data from thelist, i was expecting to be able to do:
instanceofMyClass.methodName[].variableinT;
and be able to index the connents. except ofcourse i cant do that at all.
thanks for any help.
AlanPosted Jul 8, 2008, 7:14 PM
To access the fields of an item in the List returned by the method, you can use code such as this:
Main m = new Main(); list = m.makeList();
List
// get fields of first item in list
string myString = list[0].s;
int myInt = list[0].i;