WCF Generic Property Serialization

  • Thread starter Thread starter jimtait
  • Start date Start date
J

jimtait

Can anyone tell me if using WCF serialization (or general
serialization) I am able to serialize a dynamic list of properties
(generic) for a generic class?

I can't seem to be able to do this?

Thanks in advance.

Jim
 
The WCF serializer will work fine with generic types. For a collection
of type T, you need to declare each inheritor of T as a KnownType
(look that up) on the collection of T. Also, each inheritor of T
(along with T) will likely need to be marked with the appropriate
DataContract attributes.
 
Back
Top