Question: What does the following code do? private void btnXML_Click(object sender, EventArgs e) { var doc = XDocument.Load(@../../../students.xml); string update = 3; doc. Descendants(student) . Where(x
What does the following code do? private void btnXML_Click(object sender, EventArgs e) { var doc = XDocument.Load(@"../../../students.xml"); string update = "3"; doc. Descendants("student") . Where(x => (string)x. Element("studentno") == update) . Remove(); doc. Save(@"../../../students.xml"); MessageBox.Show("Operation completed"); Select one: O a, updates an entry in the students.xml document where studentno is equals to update variable ob, adds an entry in the students.xml document where studentno is equals to update variable. Ocupdates an entry in the students.xml document where the update variable is 3. Od deletes an entry in the students.xml document where studentno is equals to update variable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
