Math.Pow Function in VB.NET
What is math.pow function in VB.NET?
Explanation
Math.Pow Function
Math.Pow in Visual Basic.net is a mathematical function that is used to return a number raised to the specified power value.
Syntax:
Math.Pow(Number,Power)
In the above syntax
Number is the number to be raised to the
Power
value specified. Both these values are double precision floating point numbers.
Example:
Module Module1
Sub Main()
Dim Number As Double = 2
Dim Power As Double = 4
Console.WriteLine('2 to the power of 4 is::'
& Math.Pow(Number, Power))
Console.ReadLine()
End Sub
End Module
Result:
2 to the power of 4 is:: 16
In the above example, the Math.Pow mathematical function is used to return the value for 2
4.