Skip to Content
VB.NET Language in a Nutshell, Second Edition
book

VB.NET Language in a Nutshell, Second Edition

by Steven Roman PhD, Ron Petrusha, Paul Lomax
April 2002
Intermediate to advanced
688 pages
19h 51m
English
O'Reilly Media, Inc.
Content preview from VB.NET Language in a Nutshell, Second Edition

Name

Sqrt Function

Class

System.Math

Syntax

Sqr(d)
d (required; Double)

Any numeric expression greater than or equal to 0

Return Value

A Double containing the square root of d

Description

Calculates the square root of a given number

Rules at a Glance

  • d must be equal to or greater than zero, or runtime error 5, “Invalid procedure call or argument,” occurs.

  • This is a Shared member, so it can be used without creating any objects.

VB.NET/VB 6 Differences

The square root function in VB 6 is named Sqr, and it is an intrinsic VB function. In the .NET Framework, it is named Sqrt, and it is a member of the Math class in the System namespace.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VB .NET Language in a Nutshell

VB .NET Language in a Nutshell

Steven Roman PhD, Ron Petrusha, Paul Lomax

Publisher Resources

ISBN: 0596003080Supplemental ContentCatalog PageErrata