P
phl
Hi, I have a class, which inherits a class that inherits a List class.
How do I pass this base List Class to another function by reference? At
the moment I just create a new List for doing this but I don't want to
do this unless I have to.
cheers
here's some code:
classA : List<string>
{
}
classB: classA
{
function B()
{
//how do I pass the List collection to somefunction here???
VVVVV
somefunction(????, string svar)
}
}
Class SomeClass
{
function somefunction(ref List<string> mylist, string svar)
{
mylist.add(svar);
}
}
How do I pass this base List Class to another function by reference? At
the moment I just create a new List for doing this but I don't want to
do this unless I have to.
cheers
here's some code:
classA : List<string>
{
}
classB: classA
{
function B()
{
//how do I pass the List collection to somefunction here???
VVVVV
somefunction(????, string svar)
}
}
Class SomeClass
{
function somefunction(ref List<string> mylist, string svar)
{
mylist.add(svar);
}
}