# Power in VB : Math Function « Development « VB.Net

Power in VB

```
Imports System

public class MainClass
Shared Sub Main()

Dim value As Integer = 5
Dim power As Integer = 4

Console.WriteLine("{0} to the {1}th power is {2}", _
value, power, value ^ power)
End Sub

End Class

```

### Related examples in the same category

 1 Math: square root 2 To the Power 3 Power ^ in VB.net 4 Calculating compound interest 5 Math.Max Demo 6 Rnd Demo 7 Square Root in Math package 8 Round in Math 9 Sign in Math 10 Atan and Tan 11 Asin and Sin 12 Acos and Cos 13 Math class: Square root, absolute value, Pi and Power 14 Math: Min, Max, Exp, Ceil, Round and Log10 15 Math.Abs Method returns the absolute value of a Decimal number. 16 Math.Atan returns the angle whose tangent is the specified number. 17 Math.BigMul produces the full product of two 32-bit numbers. 18 Math.Ceiling returns the smallest integral that is greater than or equal to the decimal number. 19 Math.Cos returns the cosine of the specified angle. 20 Math.Cosh returns the hyperbolic cosine of the specified angle. 21 Math.DivRem calculates the quotient and returns the remainder in an output parameter. 22 Math.DivRem calculates the quotient of two integers and returns the remainder in an output parameter. 23 Math.E Field represents the natural logarithmic base, specified by the constant, e. 24 Math.Exp returns e raised to the specified power. 25 Math.IEEERemainder returns the remainder resulting from the division 26 Math.Log returns the natural (base e) logarithm of a specified number. 27 Math.Log returns the logarithm of a specified number in a specified base. 28 Math.Log10 returns the base 10 logarithm of a specified number. 29 Math.Max returns the larger of two 8-bit unsigned integers. 30 Math.Min returns the smaller of two 8-bit unsigned integers. 31 Math.Pow returns a specified number raised to the specified power. 32 Math.Round rounds a decimal value to the nearest integral value. 33 Math.Round rounds a decimal value to a specified number of fractional digits. 34 Math.Round rounds a decimal to a specified number of fractional digits. 35 Math.Round (Double) rounds a double-precision floating-point value to the nearest integral value. 36 Rounds a double-precision floating-point value to a specified number of fractional digits. 37 Rounds a double-precision floating-point value to the specified number of fractional digits 38 Math.Sign returns a value indicating the sign of a decimal number. 39 Math.Tanh Returns the hyperbolic tangent of the specified angle. 40 Math.Truncate Calculates the integral part of a specified decimal number.