<add> of <declaredTypes> Element
Adds a type used by the DataContractSerializer during deserialization. Each declared type includes the known types that will be returned as a field or property of the declared type.
<add> of <declaredTypes>
<add type="String"> <knownType type="String"> <parameter index="Integer" type="String" /> </knownType> </add>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
|type||Required string attribute.
Specifies the type name (including namespace), assembly name, version number, culture, and public key token.
|<knownType>||Specifies the known type for the declared type that is being added. If the declared type is a generic type, then you must also add a parameter element to the
|<declaredTypes>||Contains the types that require known types during deserialization by the DataContractSerializer.|
See the <dataContractSerializer> for an example of using this element.
<add type="MyCompany.Library.Shape, MyAssembly, Version=188.8.131.52, Culture=neutral, PublicKeyToken=XXXXXX, processorArchitecture=MSIL"> <knownType type="MyCompany.Library.Circle, MyAssembly, Version=184.108.40.206, Culture=neutral, PublicKeyToken=XXXXXX, processorArchitecture=MSIL"/> </add>