Is there any way to test if a type is Serializable by the NetDataContractSerializer in code? I’m writing a generic class that uses the NetDataContractSerializer internally and want to throw an exception in the constructor if there is an attempt to use it with a type that it can’t handle.
Is there any way to test if a type is Serializable by the NetDataContractSerializer
Share
Here’s what I found so far. Is there a simpler way?