Public void CreateXmlDocFromArray()
{
// Now enumerate over the array to build an XElement.
XElement StudentRecords =
new XElement("StudentInfo",
from c in Student
select new XElement("Student",
new XAttribute("Name", c.Name),
new XElement("RollNo", c.RollNo)
)
);
Console.WriteLine(StudentRecords);
}
No comments:
Post a Comment