casting to multiple (unknown types) at runtime

前端 未结 3 827
春和景丽
春和景丽 2021-01-03 15:24

I\'m developing a viewer that will be able to open all of the custom documents that we produce via our software. All of the documents inherit from IDocument, but I\'m not su

3条回答
  •  青春惊慌失措
    2021-01-03 15:57

    If you can easily figure out what kind of document it is (ie: it's part of the file header), it might be easiest to have a strategy for deserializing that is specific to each type.

提交回复
热议问题