文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | 免费看大片 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院 数码学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络学院程序开发其他语言16.2 Namespace declarations
精品推荐
特别推荐
·控制面板知多少
·给你十条学习Ruby语言的理由
·分页管理机制
·Perl 语言的重要价值体现
·经验技巧:分享两条Delphi开发经验
·Java编程思想:面向对象的逻辑思维方法
·Samba系统简介
热点TOP10
·AIX 5L 学习大纲/简易教程(2)(未经许可,请勿COPY)
·DENX U-Boot及Linux使用手册
·EZ-USB 68013A开发指南
·图象处理中的边缘检测------canny算子
·Visual C++ ADO数据库编程入门
·利用 wordXP 实现自动排班
·UDT协议-基于UDP的可靠数据传输协议
·XPCOM--LINUX下的组件开发技术
·MyEclipse JSF 快速入门中文版(上)
·samba和openldap结合实战
·AIX 5L 学习大纲/简易教程(1)(未经许可,请勿COPY)
·Microsoft Windows XP Embedded 开发工具概述
·eMbedded Visual C++开发入门
·在VC6中创建wxWidgets项目[附图]
·数值计算程序大放送-线性代数方程组
·列表视图控件
·visual studio 2005 简体中文团队开发版 SQL server 2005简体中文版下载
·Visual Studio 2005:在 Visual C++ 中开发自定义的绘图控件
·汇编语言工具下载
·多文档界面(MDI)

16.2 Namespace declarations

日期:2007年5月3日 作者: 查看:[大字体 中字体 小字体]



  A namespace-declaration consists of the keyword namespace, followed by a
namespace name and body,
optionally followed by a semicolon.
namespace-declaration:
namespace qualified-identifier namespace-body ;opt
qualified-identifier:
identifier
qualified-identifier . identifier
namespace-body:
{ using-directivesopt namespace-member-declarationsopt }
C# LANGUAGE SPECIFICATION
202
A namespace-declaration may occur as a top-level declaration in a
compilation-unit or as a member
declaration within another namespace-declaration. When a
namespace-declaration occurs as a top-level
declaration in a compilation-unit, the namespace becomes a member of the
global namespace. When a
namespace-declaration occurs within another namespace-declaration, the
inner namespace becomes a
member of the outer namespace. In either case, the name of a namespace must
be unique within the
containing namespace.
Namespaces are implicitly public and the declaration of a namespace cannot
include any access modifiers.
Within a namespace-body, the optional using-directives import the names of
other namespaces and types,
allowing them to be referenced directly instead of through qualified names.
The optional namespacemember-
declarations contribute members to the declaration space of the namespace.
Note that all usingdirectives
must appear before any member declarations.
The qualified-identifier of a namespace-declaration may be a single
identifier or a sequence of identifiers
separated by ?.? tokens. The latter form permits a program to define a
nested namespace without lexically
nesting several namespace declarations. [Example: For example,
namespace N1.N2
{
class A {}
class B {}
}
is semantically equivalent to
namespace N1
{
namespace N2
{
class A {}
class B {}
}
}
end example]
Namespaces are open-ended, and two namespace declarations with the same
fully qualified name contribute
to the same declaration space (§10.3). [Example: In the example
namespace N1.N2
{
class A {}
}
namespace N1.N2
{
class B {}
}
the two namespace declarations above contribute to the same declaration
space, in this case declaring two
classes with the fully qualified names N1.N2.A and N1.N2.B. Because the two
declarations contribute to
the same declaration space, it would have been an error if each contained a
declaration of a member with the
same name. end example]
Namespaces whose names begin with System. are reserved for use by the
Standard Library (§
[1] [2] 下一页 




上一篇:15.13 The using statement

下一篇:16.1 Compilation units

16.2 Namespace declarations 相关文章:
·RFC3151 - A URN Namespace for Public Identifiers
·RFC3120 - A URN Namespace for XML.org
·RFC3061 - A URN Namespace of Object Identifiers
·RFC3043 - The Network Solutions Personal Internet Name (PIN): A URN Namespace for People and Organizations
·16.5 Type declarations
·16.2 Namespace declarations
·Delphi2005学习笔记4——再谈NameSpace和Dll以及Package
·C# Namespace
·c#里面的namespace基础(二)
·RFC3541 - A Uniform Resource Name (URN) Namespace for the Web3D Consortium (Web3D)
16.2 Namespace declarations 相关软件:

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.viphot.com
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.viphot.com All Rights Reserved. 鄂ICP备05000083号Powered by:viphot