Export (0) Print
Expand All

BigInteger::Pow Method

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

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

public:
static BigInteger Pow(
	BigInteger value, 
	int exponent
)

Parameters

value
Type: System.Numerics::BigInteger

The number to raise to the exponent power.

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.

ExceptionCondition
ArgumentOutOfRangeException

The value of the exponent parameter is negative.

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.

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

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1

Windows Phone 8.1, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft