问题描述
我正在尝试编写一个c#程序,该程序读取另一个程序创建的文件,以创建数学问题的统计信息列表.我为两个不同的程序使用了相同的统计信息类.当它尝试读取时,将引发与创建文件的程序有关的序列化异常.
用于保存到文件和从文件读取的stats类不过是要写入文件或从文件读取的公共属性而已.该类中根本没有方法.
我猜想的是,它正在寻找由其他程序创建的文件的程序集.有什么办法可以强制正在读取此文件的程序加载程序集?
谢谢,
Tim
I''m trying to write a c# program that reads a file that was made by a another program to create list of stats for math problems. I used the same stats class for the two different programs. When it tries to read it throws a serialization exception that relates to the program that created the file.
The stats class that is being used to saved to and read from a file is nothing more than just public properties to be written or read from a file. There are no methods in the class at all.
The thing I am surmising is it is looking for an assembly for the file that was made by the other program. Is there a way I can force the program that is reading this file to load the assembly?
Thanks,
Tim
推荐答案
这篇关于如何解决此序列化异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!