Unable to cast object of type 'System.Object[]' to 'MyObject[]', what gives?

前端 未结 6 1875
忘掉有多难
忘掉有多难 2021-02-19 18:09

Scenario:

I\'m currently writing a layer to abstract 3 similar webservices into one useable class. Each webservice exposes a set of objects that share commonality. I hav

6条回答
  •  醉酒成梦
    2021-02-19 18:44

    You can't convert an array like that - it's returning an array of objects, which is different from an object. Try Array.ConvertAll

提交回复
热议问题