I am reading an xml which contains elements as follows:
<xs:element name="id" type="xs:int" minOccurs="0"></xs:element>
<xs:element name="name" type="xs:string" minOccurs="0"></xs:element>
By using ExpandoObject, we can create a dynamic object and can create properties like
dynamic obj1 = new ExpandoObject();
obj1.id = 1;
obj1.name = "Shrikey";
where id and name are typecasted to int and string respectively.
But the thing which I am interested is whether I can create the "property name" also dynamically based on the content in name attribute of element.
Hope I made my question clear.
Any suggestions on how it can be done either using ExpandoObject or any other way.