Reputation: 1742
I have this requirement, I have two classes Person and Department and i want to send object of these two classes in the System.ServiceModel.Channels.Message? How can i accomplish this. I there any best way alternative to that.
Thanks in advance.
Upvotes: 0
Views: 97
Reputation: 42659
Message class has a static method called CreateMessage which has an overload to take any object that can be serialized.
Create a new datacontract\class with instances of Person and Department object. Pass the wrapper object to CreateMessage to serialize
Upvotes: 1