XmlSerializer: “The type 'Type' may not be used in this context”

后端 未结 3 1943
無奈伤痛
無奈伤痛 2021-01-03 03:29

I\'m trying to figure out how to serialize any class using the XmlSerializer, without using the XmlInclude attribute. Generally works, but with the followi

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 04:15

    Does ReactListObject inherit from ReactObject? ser1 is instantiated to serialize types of ReactObject, but from your code sample I can only tell that list is of type ReactListObject.

提交回复
热议问题