首 页文章中心客户留言enfullPDA完全版游戏天空全方位下载繁體中文
设为首页
加入收藏
联系我们
您当前的位置:技术文章大全 -> 文章中心 -> 技术开发 -> .Net专栏 -> 文章内容 退出登录 用户管理
栏目导航
· .Net专栏 · Script
· ASP学院 · PHP学院
· Web服务器 · XML学院
· SQL学院 · JSP学院
· 程序开发 · 数据库
热门文章
· 个人实习总结
· “八荣八耻”演讲稿...
· 毕业论文格式范文
· 八荣八耻 内容|八荣...
· 党校学习个人总结
· “八荣八耻”心得体...
· 教育实习总结报告
· 社会主义荣辱观教育...
· 市场营销系毕业实习...
· 党课学习思想汇报
相关文章
· asp 与 asp.net 共享...
· delphi8里在VCL.net...
· ADO.NET2.0的八大新...
· [图文] ASP.NET2.0+SQL Ser...
· ASP.NET中实现直接从...
· .NET 数据访问体系结...
· .NET 数据访问体系结...
· [图文] .Net程序如何防止被...
· .NET工程的自动化编...
· .NET中的UBB代码
.NET Framework Namespaces
作者:未知  来源:CSDN  发布时间:2006-4-20 19:33:54  发布人:admin

减小字体 增大字体

.NET Framework Namespaces
What is a namespace? If Microsoft had simply provided a list of several
thousand classes, attempting to find or work with any specific class would
be next to impossible. Although we're speculating, Microsoft might have
ended up using class names such as SystemDataOleDbDataSet and
SystemTheadingThread. Long names would be required in order to provide some
sort of groupings and perspective.

Instead, Microsoft chose to group the various classes into a hierarchical
set of namespaces. Using a syntax that separates levels in the hierarchy
with dots, you'll find yourself referring to classes like this:

System.Data.OleDb.OleDbDataReader

In this example, the .NET Framework provides a System namespace, a
System.Data namespace, and a System.Data.OleDb namespace. Each provides a
set of classes, and the OleDbDataReader class is a part of the
System.Data.OleDb namespace.

Imagine this scenario: You'd like to send a letter to a friend named Tom
who lives across the country, and you address an envelope to Tom (just
"Tom"), slap on a stamp, and drop it into a mailbox. What's the chance that
the letter will get to your friend? Next to none. If the U.S. Postal
Service had assigned each of us a local "namespace" consisting of
postalcode.state.city.streetaddress, then you might address your letter to
90012.ca.los angeles.123 Smith Street and have it reach your friend.
Microsoft faced the same sort of issue when developing the .NET Framework.
Therefore, each class belongs to a single namespace, and you'll use the
.NET Framework documentation to investigate the various classes and
namespaces.

You are probably asking yourself, which namespaces will I use most often?
This chapter discusses those namespaces you might utilize for typical Web-
or Windows-based business applications. This chapter will not (nor could
it) provide a full reference of every available namespace梩hat would take
several books itself.

The task of limiting the classes to be discussed in this chapter was
daunting梩here are well over 1,000 classes provided by the .NET Framework.
We decided to focus on classes that you're likely to use in applications
that take advantage of Windows Forms, Web Forms, Web Services, databases,
and XML. By using these rather broad areas as the basis for choosing the
namespaces, the list of classes we've included is large but not
overwhelming. Once you understand some of these objects, working with other
objects is easier.

Here's a list of the namespaces covered in this chapter:

System

System.Data

System.Data.OleDb

System.Data.SqlClient

System.IO

System.Text

System.Collections

System.Web.Services

System.Windows.Forms

System.Xml

Although this seems like quite a lot of classes to cover, we'll only
provide a brief introduction to them in this chapter. You will find more
coverage of many of these namespaces in later chapters in the book.

TIP

In order to follow along with the discussion in this chapter, you can load
the Jumpstart\FrameworkClasses\FrameworkClasses.sln solution into Visual
Studio .NET.

[] [返回上一页] [打 印] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
友情连接 - 网站地图 -