現在我有一個方法: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 回答
- 0 關注
- 400 瀏覽
添加回答
舉報
0/150
提交
取消
