How to use the. NET Global namespaces

Source: Internet
Author: User
Tags extend xmlns

Use explicit std:: qualification
#include <iostream>

int main ()
{
int Val;

Std::cout << "Enter a number:";

Std::cin >> Val;

Std::cout << "This is your number:";
Std::cout << Std::hex << val;

return 0;
}

Instance two gives the global namespace only a few names


#include <iostream>

Gain access to cout, CIN, and Hex
Using Std::cout;
Using Std::cin;
Using Std::hex;

int main ()
{
int Val;

cout << "Enter a number:";

Cin >> Val;
cout << "This is your number:";
cout << Hex << val;
return 0;
}

Reference manual

This section describes the members or types that extend the ECMAScript (JavaScript) Global object and other core objects.

JavaScript base type Extension
-->

Name

Description

Array type extension

Provides an extension of the basic JavaScript Array functionality by adding static methods.

Boolean type extension

Provides an extension to a basic JavaScript Boolean object.

Date type extension

Provides an extension to a basic JavaScript date object.

Error type extension

Provides a static function that extends the built-in JavaScript Error types by providing exception details and support for application compilation mode (debugging or Publishing).

function type extension

Provides static functions that extend the built-in ECMAScript (JavaScript) function type by providing exception details and supporting application compilation mode (debugging or Publishing).

Number type extension

Extend the basic JavaScript number feature in static methods and instance methods.

Object type extension

Provides extended functionality similar to reflection for basic JavaScript object objects.

String type extension

Provides an extension of the basic JavaScript String functionality in static methods and instance methods.

Type
!---->

name

description

type class

Global shortcuts for common APIs
-->

Name

Description

Sys.UI.DomEvent $addHandler Method

Provides a shortcut to the Sys.UI.DomEvent.addHandler method that adds a DOM event handler to the DOM element that exposes the event.

Sys.UI.DomEvent. $addHandlers Method

provide Sys.UI.DomEvent addhandlers method that adds a list of DOM event handlers to the DOM element that exposes the event.

Sys.UI.DomEvent. $clearHandlers Method

Provides a shortcut to the Sys.UI.DomEvent clearhandlers method that removes the method from the DOM element by Sys.UI.DomEvent AddHandler or Sys.UI.DomEvent All DOM event handlers that are added by the Addhandlers method.

sys.component $create Method

Provides a shortcut to the Sys.Component.create method that creates and initializes a component of the specified type.

sys.application $find Method

Provides a shortcut to the Sys.Application.findComponent method that returns the specified Component object.

Sys.UI.DomElement $get Method

Provides a shortcut to the getElementById method that returns an array of all components registered with the application using the addcomponent method.

Sys.UI.DomEvent $removeHandler Method

Provides a shortcut to the System.UI.DomEvent.removeHandler method that removes a DOM event handler from the DOM element that exposes the event.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.