阅读背景:

如何添加类型约束以包含可在通用方法中序列化的任何内容?

来源:互联网 

My generic method needs to serialize the object passed to it, however just insisting that it implements ISerializable doesn't seem to work. For example, I have a struct returned from a web service (marked with SerializableAttribute) that serializes to xml just fine, but, as expected, the C# compiler complains.My generic method needs to serialize the object




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: