我想将XML文件的全部内容保存到字符串或字符串构建器中.请让我知道我怎么能这样做?
我的函数需要将XML文件内容完全复制或保存到字符串或字符串构建器.
它是外部内容(XML文件).之后我需要更改xml文件的内容(onf字段)我可以通过C#实现它.请告诉我.
我有以下XML格式的内容,我想放入一个字符串并将其传递给另一个函数,以便实现我的工作.
<wsa:Address xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
<wsa:ReferenceParameters xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<wsman:ResourceURI>http://schema.unisys.com/wbem/wscim/1/cim- </wsa:ReferenceParameters>
</p:Source>
</p:INPUT>";
Run Code Online (Sandbox Code Playgroud)
--------------------------------------------------
此致,
Channaa
我有一个日期列表如下
List<string> nameList = new List<string>();
nameList.Add("20120618PM");
nameList.Add("20120622PM");
nameList.Add("20120622AM");
nameList.Add("20120628PM");
nameList.Add("20120702PM");
nameList.Add("20120629AM");
nameList.Add("20120629PM");
Run Code Online (Sandbox Code Playgroud)
我想从列表中找到MAXDATE和MIN DATE.请让我知道如何继续.
此致,
Channa
c# ×2