deserializing enums

前端 未结 5 1256
轻奢々
轻奢々 2020-12-06 10:20

I have an xml in which one of the elements has an attribute that can be blank. For e.g.,



.....

         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-06 10:38

    You probably need to mark up your enumeration, and add a default item that represents Unknown.

    For example:

    Public Enum EmployeeStatus
        Unknown = 0
        One = 1
        Two = 2
        Three = 3
    End Enum
    

    For more information, see here.

提交回复
热议问题