为了账号安全,请及时绑定邮箱和手机立即绑定

WCF 序列化 Type对象

WCF 序列化 Type对象

慕慕森 2018-10-17 09:10:34
现在我有一个方法:public object Fetch(Type objectType){}这个方法调用一个WCF的方法,并且把objectType作为参数传进去,因为WCF不能很好的序列化Type类型,所以每次都是报错:Type 'System.RuntimeType' with data contract name 'RuntimeType:http://schemas.datacontract.org/2004/07/System' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.希望大家帮忙?怎么解决
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 359 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信