在做动态调用时碰到一个问题,The constructor to deserialize an object of type 'MSNException' was not found,其中MSNException 标记为Serializable tag,并且MSNException 从 Exception 继承,而且Exception本身已经实现ISerializable interface ,这使我非常的困惑,后来我查看Exception源代码看到这样一个构造函数

恍然大悟,遂添加一个MSNException构造函数,问题解决

Deserialization Problems ... The constructor to deserialize an object of type ... was not foundpublic MSNException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Deserialization Problems ... The constructor to deserialize an object of type ... was not found            : 
base(info, context)
        }

相关文章: