I’ve created a base class, and 2 inherited classes. I want to create a WCF operation contract where the parameter is the base class. Is there a decoration I can put on the parameter or classes that indicates that the value supplied must be one of the inherited classes?
Share
Jeremy,
On the base class, you can use the known type attribute.
Please reference http://msdn.microsoft.com/en-us/library/ms730167.aspx
The are other ways of accomplishing this.
Here is a great MSDN article by Juval Lowy on Data Contract Inheritance:
http://msdn.microsoft.com/en-us/magazine/gg598929.aspx