Returning a collection of objects from a webmethod
- by Narmatha Balasundaram
How do I return a collection of objects from a webmethod? And can this collection of objects be of different types - say of these 3 classes,
private class ClassA
{
int A1;
int A2;
}
private class ClassB
{
int B1;
}
private class ClassC
{
int C1;
}
ClassA objA = new ClassA(...);
ClassB objB = new ClassB(...);
ClassC objC = new ClassC(...);
How can I return the objects, objA, objB and objC from a method?