Can I have a webservice method that returns List<List<MyObject>>
in .net?
views:
36answers:
2
A:
Yes. You can. You can return pretty much any object. And I've done exactly this in several projects.
David Stratton
2010-01-21 20:36:41
+1
A:
[DataContract]
public class MyObject
{
}
[ServiceContract]
public interface IMyService
{
[OperationContract]
List<List<MyObject>> ServiceOperation();
}
public class MyService : IMyService
{
public List<List<MyObject>> ServiceOperation()
{
return new List<List<MyObject>>();
}
}
John Saunders
2010-01-21 20:44:09
+1 for providing the example.
David Stratton
2010-01-21 20:48:37