1
Answer

return type of a web method

softlera

softlera

20y
1.8k
1
hello forum, I am developing a Web Service in C# with Visual Studio .NET. I want to define a web method which returns a type (for example, a struct) if the operation is successful and returns another different type (another struct) if the operation fails. I dont Know how to do this with Web Services. Could you help me? Thanks in advance.
Answers (1)
0
huch

huch

NA 8 0 20y
Why not define an (abstract) superclass to return? The two other classes inherit from this superclass. But dont forget to use the XMLIncludeAtrribute, so that the Serializer knows that he has to expect also the 2 other classes for deserialization.