1
所有我想做实现默认访问是序列化异常:System.InvalidOperationException:您必须在System.Collections.Generic.Stack`1
XmlSerializer serializer = new XmlSerializer(typeof(Stack<int>));
,并在运行时,我得到以下:
System.InvalidOperationException
:必须实现一个默认的访问 System.Collections.Generic.Stack
`1 [System.Int32,mscorlib程序,版本= 2.0.0.0, 文化=中性公钥= b77a5c561934e089]],因为它自ICollection继承。我不应该序列化Stack<int>
?
它确实有用,谢谢!知道为什么框架设计者决定不支持堆栈本身的序列化会是很有意思的...... –
user8032
2008-12-29 21:24:52