title: cast or convert XmlNodeList to XmlNode
body: <p>Im having an issue with my code and was hoping i could get some assistance from you. I have a method that is of type XmlNodeList (GetDetailPageSectionBySA), now that method is used as one of the parameters in another method. But that method (GetServiceAccountusageAndBillingDetail) is expecting a type of XmlNode for that parameter(saDetailedPageNode). If i change that data type to XmlNodeList for that parameter then it messes up a whole bunch of stuff down the line where only XmlNode can be used. </p>
  
  <p>Why dont I just change the type of the first method (GetDetailPageSectionBySA) to XmlNode and solve all my issues you ask? Because that type can only return one node and that method returns a collection of nodes and needs to use XmlNodeList. </p>
  
  <p>So im just wondering if there is any ways to convert or cast XmlNodeList to XmlNode and if so how is it done?</p>
  
  <pre><code>foreach (GetBillForCAResponse eBillResponse in eBillResponseList)
  {
     var statementDetailsResponse = GetStatementDetails(
         new GetStatementDetailsRequest
         {
             BatchId = eBillResponse.BatchId,
             CustomerAccountId = eBillResponse.CA.ToString("000000000"),
             StatementId = eBillResponse.CAS_NUM.ToString("0000")
         });
  
     string xmlBill = statementDetailsResponse.StatementAsXML.ToString();
     var document = new XmlDocument();
     document.LoadXml(xmlBill);
  
     ****var saDetailedPageNode = XmlBillParser.GetDetailPageSectionBySA(requestSA, xmlBill);// This is the method of type XmlNodeList
     if (saDetailedPageNode == null) continue;
  
     var customerBill = new CustomerBill();
     customerBill.IsSurepay = XmlBillParser.GetSurepayFlagFromBill(document);
     customerBill.ServiceAddress = XmlBillParser.GetServiceAddress(requestSA, document);
     customerBill.MonthName = XmlBillParser.GetBillStatementDate(requestSA, xmlBill);
     customerBill.EqCurPlanBal = XmlBillParser.GetEqualizerCurrentPlanBalance(document);
     customerBill.EqPymntDue = XmlBillParser.GetEqualizerPaymentDue(document);
  
     ****customerBill.Service = GetServiceAccountUsageAndBillingDetail(requestSA, xmlBill, saDetailedPageNode);// This is where the invalid argument is because saDetailedPageNode should be of type XmlNode
     response.Add(customerBill);
  }
  </code></pre>
  
  <p>I have put **** where the issue is as well as comments on those lines. I am a beginner in coding and any help would be great. Thanks in advanced.</p>