TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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
Reply
Answers (
1
)
xml & xsl transform
C# object to com+