abdelwaheb ammar

abdelwaheb ammar

  • 1.3k
  • 457
  • 124.6k

Convert enum type to string type when deserialize an xml

Jan 9 2020 3:21 AM
hello i  have create an property with type enum 
  1. public propkey mykey    
  2. {    
  3.     get    
  4.     {            
  5.         return this.myKeyField;               
  6.     }    
  7.     set    
  8.     {  
  9.         this.myKeyField = value;    
  10.     }    
  11. } 
and i deserialize a xml to object that contain mykey as property but i want to get it as string before assign to enum. how can i do that ?

Answers (2)