Hello,
Basically I just want to get the properties of the derived class with [Test] attribute from the base class.
Here is my sample code:
namespace TestConsole
{
public class BaseClass
{
private System.Int64 _id;
public BaseClass()
{ }
[Test]
public System.Int64 ID
{
get { return _id;}
set { _id = value;}
}
public System.Xml.XmlNode ToXML()
{
System.Xml.XmlNode xml = null;
//Process XML here
return xml;
}
}
public class DerivedClass : BaseClass
{
System.String _name;
public DerivedClass()
{ }
[Test]
public System.String Name
{
get { return _name; }
set { _name = value; }
}
}
public class TestConsole
{
public static void main()
{
DerivedClass derivedClass = new DerivedClass();
System.Xml.XmlNode xmlNode = derivedClass.ToXML();
}
}
}
I want the xmlNode to be something like this:
<root>
<class name="DerivedClass">
<Field name="Id">
<Field name="Name">
</class>
</root>
Thank you