Microsoft.Protocols.TestSuites.MS_LISTSWS.AdapterHelper.GetElementValue C# (CSharp) Method

GetElementValue() public static method

A method used to get the value of Element from an XmlElement array by specified name.
public static GetElementValue ( XmlElement elements, string name ) : string
elements System.Xml.XmlElement A parameter represents the source elements where the method finds the value.
name string A parameter represents the specified element name which is used to find element's value.
return string
        public static string GetElementValue(XmlElement[] elements, string name)
        {
            return elements.FirstOrDefault<XmlElement>(e => e.LocalName.Equals(name, StringComparison.OrdinalIgnoreCase)).InnerText;
        }
    }