----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Keshav_Kalsi Message 1 in Discussion 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 <Participant xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="2323-232-3434" Name="Participant1"> <ParticipantType Type="HUMAN" /> </Participant> but i get something like <Participant xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="2323-232-3434" Name="Participant1"> <Type="HUMAN" /> </Participant> 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 go for seperate class for ParticipantType? Some one pls help me. Regds, Keshav ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
