kmurthy2

kmurthy2

  • NA
  • 3
  • 0

XmlSerialization - Object Serialization

Feb 2 2004 4:37 AM
Hi All, I have a class by name "Participant" and it has properties such as "Id" ,"Name",Type". Type is of type enum. I am using xmlserializer to serialize. When i serialize I should get but i get something like What's wrong with the following code public enum PartcpntType {HUMAN,ROLE,ORGANIZATIONAL_UNIT,RESOURCE,RESOURCESET,SYSTEM} public class Participant { protected string _id; protected string _name; private PartcpntType partType; [XmlAttribute("Id")] /* sets or gets id */ public string Id { get {return _id;} set { _id = value;} } [XmlAttribute("Name")] public string Name { get {return _name;} set {_name = value;} } //[new XmlElement("ParticipantType")] [XmlAttribute("Type")] public WFParticipantType ParticipantType { get { return participanttype;} set {participanttype = value;} } } Pls correct me if the above code is wrong. Do i need to write seperate class for ParticipantType? Some one pls help me. Regds, Keshav

Answers (1)