Another solution to this will be to wrap all these objects up into a class and have this as the return type.
public class MyReturnType {
public ClassA A { get;set; }
public ClassB B { get;set; }
public ClassC C { get;set; }
}
and return an instance of MyReturnType (or List
Returning this composite MyReturnType object will be the ideal solution. But in my case, the elements of this class are known only at run time. Typically, this class will need to be build at run time. The easier alternate will be to
[WebMethod]
public object[] GetObjects()
{
...
return new object[] { objA, objB, objC };
}