C# BigInteger Pow

Description

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

Syntax

BigInteger.Pow has the following syntax.


public static BigInteger Pow(
  BigInteger value,
  int exponent
)

Parameters

BigInteger.Pow has the following parameters.

  • value - The number to raise to the exponent power.
  • exponent - The exponent to raise value by.

Returns

BigInteger.Pow method returns The result of raising value to the exponent power.

Example


using System;/*w w  w.  j  av a2 s.  com*/
using System.IO;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger numericBase = 3040506;
        for (int ctr = 0; ctr <= 10; ctr++)
        {
           Console.WriteLine(BigInteger.Pow(numericBase, ctr));
        }
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex