Question:You create a class library that is used by applications in three different departments of the The library contains a Department class with the following definition: Public Class Department Public name As String Public manager As String End Class Each application uses a custom configuration section to store department-specific values in the application configuration file as shown in the following code segment: <Departroent> <name>Hardware</name> <manager>Amy</manager> </Department> You need to create a Department object instance by using the field values retrieved from the application configuration file. How should you complete the code segment? To answer, drag the appropriate code segment or segments to the correct location or locations in the answer area. 

A <strong>Public Class deptHandler Implements IConfigurationSectionHandler</strong><br />���<strong> Public funciton Create(ByVal parent As Object, ByVal configCintext As Object, ByVal section As System.Xml.XmlNode)As _Object Implements System.Configuration.IConfigurationSectionHandler.Create</strong><br />������� Dim dept As Department=New department()<br />���������<strong> dept.name= section.SelectSingleNode("name").InnerText</strong><br />���������<strong> dept.manager=section.SelectSingleNode("manager").InnerText</strong><br />������ Return dept<br />� End Funtion<br />End Class 

B <strong>Public Class deptHandler Implements IConfigurationSectionHandler</strong><br />���<strong> Public funciton Create(ByVal parent As Object, ByVal configCintext As Object, ByVal section As System.Xml.XmlNode)As _Object Implements System.Configuration.IConfigurationSectionHandler.Create</strong><br />������� Dim dept As Department=New department()��������� <br />���������<strong> dept.manager=section.SelectSingleNode("manager").InnerText</strong><br />���������<strong> dept.name= section.SelectSingleNode("name").InnerText</strong><br />������ Return dept<br />� End Funtion<br />End Class 

C <strong>Public Class deptHandler Implements IConfigurationSectionHandler</strong><br />���<strong> Public funciton Create(ByVal parent As Object, ByVal configCintext As Object, ByVal section As System.Xml.XmlNode)As _Object Implements System.Configuration.IConfigurationSectionHandler.CreateXML</strong><br />������� Dim dept As Department=New department()<br />��������� <strong>dept.name= section.SelectSingleNode("name").InnerText</strong><br />��������<strong>� dept.manager=section.SelectSingleNode("manager").InnerText</strong><br />������ Return dept<br />� End Funtion<br />End Class 

D <strong>Public funciton Create(ByVal parent As Object, ByVal configCintext As Object, ByVal section As System.Xml.XmlNode)As _Object Implements System.Configuration.IConfigurationSectionHandler.Create</strong><br /><strong>��� Public Class deptHandler Implements IConfigurationSectionHandl</strong>er��� <br />������� Dim dept As Department=New department()<br />��<strong>������� dept.name= section.SelectSingleNode("name").InnerText</strong><br /><strong>��������� dept.manager=section.SelectSingleNode("manager").InnerText</strong><br />������ Return dept<br />� End Funtion<br />End Class 

+ Answer
+ Report
Total Preview: 1265

Copyright © 2024. Powered by Intellect Software Ltd