using System.Collections;
using System.Collections.Generic;
public static void Main()
List<Student> students = new List<Student>() {new Student {ID=1, Name="hari", Address="xyz", Phone="880234302" }, new Student {ID=2, Name="prasad", Address="xyz", Phone="880234302" }};
(from student in students
select new XElement("Student",
new XElement("ID", student.ID),
new XElement("Name",student.Name),
new XElement("Address", student.Address),
new XElement("Phone",student.Phone)