How to convert ISingleResult<..> to List? in WCF?
please give detail information...

Recommended Answers

All 2 Replies

ISingleResult<T> : IEnumerable<T>, so just use System.Linq.Enumerable.ToList.

Or, you can just instantiate the List with the ISingleResult:

ISingleResult<myType> isr;
List<myType> myList = new List<myType>(isr);

Either way should work, as the List<T>() constructor is overloaded to take any collection that implements IEnumerable<T>.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.