Hi all,
I'm curious about the KnownType attribute, and when to use it--I'm not terribly clear, after reading the MSDN reference. So yes, the attribute communicates type information to the serializer, but when is this needed? Is it appropriate when the class being serialized has references of a base class type, and there are up-cast derivative classes that could be set to those references?
Moreover, are there any drawbacks to overusing the attribute? For instance, in the previous example, if the serialized class was marked with KnownType(baseClass) even though there was an explicit reference to that type?
Thanks!