Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Sqrt Function

Class

System.Math

Syntax

Dim result As Double = Sqrt(d)

d (required; Double)

Any numeric expression greater than or equal to 0

Description

The Sqrt function calculates the square root of a given number, d.

Usage at a Glance

This is a shared member of the System.Math class, so it can be used without an instance.

Version Differences

The name of this function has changed since VB 6. In VB 6, its name was Sqr, and it was an intrinsic VB function. In .NET, it is named Sqrt, and it is a member of the System.Math class.

See Also

Pow Function

Категории