Share via


IPMath.Max method

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

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Function Max ( _
    pxmllistInput As IXMLDOMNodeList _
) As Object
'Usage
Dim instance As IPMath
Dim pxmllistInput As IXMLDOMNodeList
Dim returnValue As Object

returnValue = instance.Max(pxmllistInput)
Object Max(
    IXMLDOMNodeList pxmllistInput
)

Parameters

Return value

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

Remarks

Important

This member can be accessed without restrictions.

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.Max(ages);
thisXDocument.UI.Alert(maxAge.ToString());

See also

Reference

IPMath interface

IPMath members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace