WCF Generic Property Serialization

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
 
N

not_a_commie

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top