I have a type, let\'s call it Data
. I also have a WCF service contract that accepts a type (lets call it Wrapper
) with a property of type
From here...
Known types can also be defined in config as shown below.
The above config specifies that the generic parameter for Circle is the same as the generic parameter for the declared type Shape. The config allows the definition of known type of arbitrary complexity. For example if it is needed to define Circle< Dictionary< string, T >> as the known type of Shape< T > (of course this is purely academic) it can be done as follows.
Note the use config element “parameter” with the attributes ‘type’ and ‘index’.