问题1:
Type 'JDBYSJ.Data.NewsChannel' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
翻译: “JDBYSJ.Data类型。NewsChannel”不能被序列化。考虑与DataContractAttribute属性标记,标记它的全部成员要序列化的DataMemberAttribute属性。或者,您能够确保公共和类型有一个无参数的构造函数——全部公共成员的类型将被序列化,也没有须要的属性。
问题缘由:序列化的类里面有带参数的构造函数
解决方法:去掉该构造函数
问题2:
该项目须要平台 SDK (UAP, Version=10.0.10586.0),但还没有安装。请访问以下连接以了解详细信息
问题缘由:系统版本与程序须要的版本不匹配
解决方法:用文本方式打开csproj 而后搜索UAP 将UAP的值改成电脑当前版本的值。。。。。(改完以后能够加载可是运行的时候可能会出错)
问题3:
Collection was modified; enumeration operation may not execute.
问题缘由:foreach里面不能对集合进行Remove或者Add操做
解决方法:用for循环代替