A
Anthony Paul
Hello everyone,
I've been fooling around with what's possible and not with the
TypeDescriptorProvider and found a limitation that I would like
confirmed if possible. I derived a class from CustomTypeDescriptor
and
did an override on the GetAttributes method and added a
Serializeable
attribute; this way any type registered with my
TypeDescriptorProvider
would supposedly be marked as Serializeable without having to
actually
modify that class's code. However, when I tried to serialize it with
a
BinaryFormatter I found that I get the usual "not marked
Serializeable" exception. I believe that this is due to the formatter
using reflection rather than the TypeDescriptor in order to get the
attributes. Am I correct in my assumption and if so, then how useful
is the TypeDescriptor system?
Regards,
Anthony
I've been fooling around with what's possible and not with the
TypeDescriptorProvider and found a limitation that I would like
confirmed if possible. I derived a class from CustomTypeDescriptor
and
did an override on the GetAttributes method and added a
Serializeable
attribute; this way any type registered with my
TypeDescriptorProvider
would supposedly be marked as Serializeable without having to
actually
modify that class's code. However, when I tried to serialize it with
a
BinaryFormatter I found that I get the usual "not marked
Serializeable" exception. I believe that this is due to the formatter
using reflection rather than the TypeDescriptor in order to get the
attributes. Am I correct in my assumption and if so, then how useful
is the TypeDescriptor system?
Regards,
Anthony