Number Type Extensions
Extends the base ECMAScript (JavaScript) Number Object functionality with static and instance methods.
Namespace: None. This type extension is global and not part of a namespace.
Inherits: None
Syntax
var numberVar = Number.parseInvariant("4");
Extension Functions
Remarks
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 JScript Language Reference.
Example
The following example shows how to call the Microsoft ASP.NET AJAX parseInvariant extension function to create a number from the string representation of a number.
JavaScript
var a = Number.parseInvariant("4");
var b = new Number(2);
var c = Number.parseInvariant("1.53") + a + b;
// View the results: "7.53"
alert(c);