IPMath.Avg(IXMLDOMNodeList) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the average value of all numerical elements in a node set.
public:
System::Object ^ Avg(Microsoft::Office::Interop::InfoPath::Xml::IXMLDOMNodeList ^ pxmllistInput);
public object Avg (Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNodeList pxmllistInput);
abstract member Avg : Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNodeList -> obj
Public Function Avg (pxmllistInput As IXMLDOMNodeList) As Object
- pxmllistInput
- IXMLDOMNodeList
The node set that contains the values to be averaged.
An object that represents the average value of all the numerical elements in a node set.
In the following example, the variable averageAge
is set to the average value of all of the numerical elements in the my:ages
node set. my:ages
is a simple field inside a repeating section or table.
IXMLDOMNodeList ages = thisXDocument.DOM.selectNodes("//my:ages");
object averageAge = thisXDocument.Util.Math.<span class="label">Avg</span>(ages);
thisXDocument.UI.Alert(averageAge.ToString());
Produkt | Verzie |
---|---|
InfoPath form templates | Latest |