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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!