Posts Tagged: KnownType

KnownType attribute in wcf: Part 6

The wcf service generally accept and returns the base type. If you expect the service to accept and return inherited type then we use knowntype attribute. In other words by default you cannot use subclass of data contract class instead of its base class. We need to tell explicitly to wcf about the subclass using the knowntype attribute.