Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我调用一个函数并将一个Stream对象传递给她以供创建XmlReader对象使用时,我遇到了一个奇怪的情况。
Stream
XmlReader
这个函数第一次运行良好,但是如果我再次给她打电话,然后在代码中给她相同的流,我得到了一些异常,这是XmlReader.create()返回 None 而不是再次获得XmlReader对象分配的结果,这是为什么呢? 我能做些什么?
XmlReader.create()
如果您要读取相同的流两次,则可能需要重置读取之间的位置:
streamInstance.Position = 0;