Simple Math Function VB.NET

Simple Math Function VB.NET



Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        PerformMathFunctions()

    End Sub

    Private Sub PerformMathFunctions()

        Dim i As Integer

        i = Math.Pow(2, 3)
        MessageBox.Show("2 power of 3 = " & i)

        i = Math.Sqrt(16)
        MessageBox.Show("squareroot 16 = " & i)

        i = Math.Round(5.34444)
        MessageBox.Show("rounding 5.34444 = " & i)

    End Sub
End Class


Learn More :