Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
For some requirements I want to return Sytem.Object by web method in webservice(c#). Is it possible or not if yes then how and why...
Posted
Comments
Ganesh KP 9-Dec-13 2:28am    
I think we can return an Object, as an Object is also a base data type, try to create a sample service which returns an object and consume that in your application.
Ganesh KP 9-Dec-13 2:29am    
for more info see this link too http://social.msdn.microsoft.com/Forums/en-US/599ed74a-ad3d-451e-9a41-551900c542da/returning-object-from-webservice

Anything you return from any method in C# (including web methods) is an Object - everything is derived from Object.

So yes, you can - just declare the return parameter to be an object
However, that doesn't mean you will be able to use it at the other end...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900