Edit

Share via


IPMath.Max(IXMLDOMNodeList) Method

Definition

Gets the largest value of all of the numerical elements in a node set.

public:
 System::Object ^ Max(Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMNodeList ^ pxmllistInput);
public object Max (Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNodeList pxmllistInput);
abstract member Max : Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNodeList -> obj
Public Function Max (pxmllistInput As IXMLDOMNodeList) As Object

Parameters

pxmllistInput
IXMLDOMNodeList

The node set to search for the largest value.

Returns

An object that represents the largest value of all the numerical elements in a node set.

Examples

In the following example, the variable maxAge is set to the largest age value in my:ages, and is returned in a repeating section or table with a field named "ages." An alert is also shown with the largest age value.

IXMLDOMNodeList ages = thisXDocument.DOM.selectNodes("//my:ages");
object maxAge = thisXDocument.Util.Math.<span class="label">Max</span>(ages);
thisXDocument.UI.Alert(maxAge.ToString());

Remarks

Important: This member can be accessed without restrictions.

Applies to