I use a WCF service from another company and return an object of type object. Is there a reason not to return the actual class and return an object that needs to be entered in the correct form?
For example, if a web service returns an object of type OrderStatus, why do you instead return a plain old one object?
Correct me if I am wrong, but this will require that I get the class definition OrderStatusmanually (via email or the like) and put it in my solution. In addition, I will have to explicitly pass the object to the object OrderStatus. Not to mention the fact that the company can change the service to return an object of a different type, and my code will stop working.
If the return value of the service was an object of type OrderStatus, will the class be automatically created for me correctly?
source
share