The method I have been using to query an XElement works in Windows but not in Xamarin Android:
using System.Xml;
using System.Xml.Linq;
using System.Linq;
public string ValidateLicense()
{
XElement xEl;
string sMessage;
Model.clsWebServiceFunctions cSvc = new Model.clsWebServiceFunctions();
sMessage = cSvc.QueryWEB_ValidateLicense();
xEl = cSvc.ServiceGetData(clsSettings.LicensingUrl, sMessage);
var vResult = from results in xEl.DescendantsAndSelf("Result")
select results;
return vResult.First().Element("LicensingResult").Value;
}
The message I get is
Method
'First' not found in type
'IEnumerable'1'
This seems to be due to Xamarin not supporting this method?!
I have do lots of similar queries in my app, so can someone recommend an alternative that will work in Xamarin? I could bodge this but don't know a good solution.