現(xiàn)在我有一個(gè)方法:public object Fetch(Type objectType){}這個(gè)方法調(diào)用一個(gè)WCF的方法,并且把objectType作為參數(shù)傳進(jìn)去,因?yàn)閃CF不能很好的序列化Type類(lèi)型,所以每次都是報(bào)錯(cuò):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.希望大家?guī)兔??怎么解決
- 1 回答
- 0 關(guān)注
- 381 瀏覽
添加回答
舉報(bào)
0/150
提交
取消