G
Guest
i have class contains a object of class containg object of other class like
following
public class requirement
{
//Because I need array of orComposite class
public ArrayList alComp;
//What I need is function that create new orComposite then i can use
the object to access orComposite memeber like following then add the object
to arraylist
//AddorComposite().type.data = "blah blah";
public (what should i put here) AddorComposite()
{
orComposite o = new orComposite ();
//what should i do here to make function see the member
of orComposite
//then i need to add it to arraylist is this possbile???
}
}
public class orComposite
{
public type type;
}
public class type
{
public static string data;
}
following
public class requirement
{
//Because I need array of orComposite class
public ArrayList alComp;
//What I need is function that create new orComposite then i can use
the object to access orComposite memeber like following then add the object
to arraylist
//AddorComposite().type.data = "blah blah";
public (what should i put here) AddorComposite()
{
orComposite o = new orComposite ();
//what should i do here to make function see the member
of orComposite
//then i need to add it to arraylist is this possbile???
}
}
public class orComposite
{
public type type;
}
public class type
{
public static string data;
}