BigInteger.Pow Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Raises a BigInteger value to the power of a specified value.

Namespace:  System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

Syntax

'Declaration
Public Shared Function Pow ( _
    value As BigInteger, _
    exponent As Integer _
) As BigInteger
public static BigInteger Pow(
    BigInteger value,
    int exponent
)

Parameters

  • exponent
    Type: System.Int32
    The exponent to raise value by.

Return Value

Type: System.Numerics.BigInteger
The result of raising value to the exponent power.

Exceptions

Exception Condition
ArgumentOutOfRangeException

The value of the exponent parameter is negative.

Remarks

The Pow method returns 1 if the value of the exponent parameter is 0, or if the values of both the value and exponent parameters are 0. If exponent is 1, the Pow method returns value. If value is negative, the method returns a negative result.

This method corresponds to the Math.Pow method for primitive numeric types.

Examples

The following example illustrates exponentiation using a BigInteger value and an exponent whose value ranges from 0 to 10.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.