What are the possible datatypes that can be return from asp.net webservice.
A:
All primitives including String can be returned with no special code requried. Otherwise you must use data contracts (if you are using WCF) or more powerful XML serialization API.
Strelok
2010-05-04 05:19:25
Can a HashTable be returned from asmx webservice
2010-05-04 05:24:20
+1
A:
If you mean asmx, then:
- pretty much any of the inbuilt primitives and standard data types
Stream
/byte[]
- arrays, or lists / collections with obvious semantics
- xml-serializable types:
- public types with public parameterless constructors and public properties/fields (optionally attributed for more control)
- public types that implement
IXmlSerializable
For WCF, add data-contracts to that list.
Marc Gravell
2010-05-04 05:20:38