现在我有一个方法: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
提交
取消