For example, consider the following class:
public class Test
{
public:
// public, parameterless constructor req'd for serialization
Test(void) {}
public:
[XmlElement("Member1")]
int m_Member1;
[XmlElementAttribute("Member2")]
int m_Member2;
}
Even MSDN doesn't seem quite clear on which to use. From the code I've seen, it sounds like XmlElementAttribute is the object in the .NET framework that handles this, but I am to use "XmlElement" while actualing writing the attribute. In contrast, I have seen other code that appends the "Attribute" part of the object name. What is the difference, and which is correct
Anjo