在可视化C#项目中,我想将XML文档对象传递给方法。在那个方法中,我应该读取存储在XML文档对象中的值。无需创建XML文件。感谢大家的回复,我终于得到了我的代码。//usefollowingcodewhenassignvaluestoXMlDocumentXMLOBJECT(){XmlDocumentxmlEmployee=newXmlDocument();XmlElementxmlRoot=xmlEmployee.CreateElement("HR");XmlElementxmlEmployees=xmlEmployee.CreateElement("Employee");xmlEm