本文介绍了BinaryFormatter无法反映类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...
请看一下这段代码:

hey guys...
please take a look on this piece of code:

FileStream fileStream = new FileStream(fileName, FileMode.Create);
(new BinaryFormatter()).Serialize(fileStream, toSave);
fileStream.Flush();
fileStream.Close();



我在第二行出现错误-反映类型为"myType"的错误-
"myType"是可预测的[Serializable];
在"myType"中,我有一个类型为"ZedGraph.LineItem"的属性,我认为这是原因.那我该怎么知道...
请帮助...



I have an error on second line -There was an error reflecting type "myType"-
"myType" is predictably [Serializable];
in "myType" I have a property of type "ZedGraph.LineItem" and I think it''s the cause.
so what should I do know...
please help...

推荐答案


这篇关于BinaryFormatter无法反映类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 11:14