This documentation is archived and is not being maintained.

Number Type Extensions

Visual Studio 2008

Extends the base ECMAScript (JavaScript) Number functionality with static and instance methods.

Namespace: None. This type extension is global and not part of a namespace.

Inherits: None

var numberVar = Number.parseInvariant("4");



Number.format Function

Formats a number by using the invariant culture.

Number.localeFormat Function

Formats a number by using the current culture.

Number.parseInvariant Function

Returns a numeric value from a string representation of a number.

Number.parseLocale Function

Creates a number from a locale-specific string.

Number extensions are part of the Microsoft AJAX Library. They add functionality to the JavaScript Number object and provide members that are more familiar to .NET programmers.

For more information about the JavaScript object that this type extends and about its constructor, see JScript Number Object in the Language Reference.

The following example shows how to call the ASP.NET AJAX parseInvariant extension function to create a number from the string representation of a number.