Custom Xml Serialization of Unknown Type

前端 未结 3 1509
失恋的感觉
失恋的感觉 2020-12-21 06:19

I\'m attempting to deserialize a custom class via the XmlSerializer and having a few problems, in the fact that I don\'t know the type that I\'m going to be deserializing (i

3条回答
  •  攒了一身酷
    2020-12-21 07:03

    To create an instance from a string, use one of the overloads of Activator.CreateInstance. To just get a type with that name, use Type.GetType.

提交回复
热议问题