选择显示字体大小

.net framework namespaces

.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.


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons