外教问题.docx

上传人:b****2 文档编号:3146337 上传时间:2023-05-05 格式:DOCX 页数:26 大小:33.40KB
下载 相关 举报
外教问题.docx_第1页
第1页 / 共26页
外教问题.docx_第2页
第2页 / 共26页
外教问题.docx_第3页
第3页 / 共26页
外教问题.docx_第4页
第4页 / 共26页
外教问题.docx_第5页
第5页 / 共26页
外教问题.docx_第6页
第6页 / 共26页
外教问题.docx_第7页
第7页 / 共26页
外教问题.docx_第8页
第8页 / 共26页
外教问题.docx_第9页
第9页 / 共26页
外教问题.docx_第10页
第10页 / 共26页
外教问题.docx_第11页
第11页 / 共26页
外教问题.docx_第12页
第12页 / 共26页
外教问题.docx_第13页
第13页 / 共26页
外教问题.docx_第14页
第14页 / 共26页
外教问题.docx_第15页
第15页 / 共26页
外教问题.docx_第16页
第16页 / 共26页
外教问题.docx_第17页
第17页 / 共26页
外教问题.docx_第18页
第18页 / 共26页
外教问题.docx_第19页
第19页 / 共26页
外教问题.docx_第20页
第20页 / 共26页
亲,该文档总共26页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

外教问题.docx

《外教问题.docx》由会员分享,可在线阅读,更多相关《外教问题.docx(26页珍藏版)》请在冰点文库上搜索。

外教问题.docx

外教问题

LongQuestions

1.Chooseanyfourfromthefollowingandwriteshortnoteonthem:

(选择一下任意四个词,名词解释至少四行)

a.CLR

The.NETFrameworkprovidesarun-timeenvironmentcalledthecommonlanguageruntime,whichrunsthecodeandprovidesservicesthatmakethedevelopmentprocesseasier.ItworksasalayerbetweenOperatingSystemsandtheapplicationswrittenin.NetlanguagesthatconformstotheCommonLanguageSpecification(CLS).ThemainfunctionofCommonLanguageRuntime(CLR)istoconverttheManagedCodeintonativecodeandthenexecutetheProgram.TheManagedCodecompiledonlywhenitneeded,thatisitconvertstheappropriateinstructionswheneachfunctioniscalled.TheCommonLanguageRuntime(CLR)'sJustInTime(JIT)compilationconvertsIntermediateLanguage(MSIL)tonativecodeondemandatapplicationruntime.

Duringtheexecutionoftheprogram,theCommonLanguageRuntime(CLR)managesmemory,Threadexecution,GarbageCollection(GC),ExceptionHandling,CommonTypeSystem(CTS),codesafetyverifications,andothersystemservices.

.NET框架提供了一个运行时环境称为公共语言运行时,它运行的代码并提供服务,使开发过程更加容易。

它作为操作系统和应用程序写在一层之间。

NET语言符合公共语言规范(CLS)。

公共语言运行库(CLR)的主要功能是将托管代码到本地代码,然后执行程序。

托管代码编译时才需要的,即它转换成适当的指令时,每个函数被调用。

公共语言运行库(CLR)只是在时间(JIT)编译转换成中间语言(MSIL)在应用程序运行时要求本地代码。

在程序执行过程中,公共语言运行库(CLR)管理内存,线程执行,垃圾收集(GC),异常处理,通用类型系统(CTS),代码安全验证,和其他系统服务。

b.CTS

CommonTypeSystem(CTS)describesasetoftypesthatcanbeusedindifferent.Netlanguagesincommon.Thatis,theCommonTypeSystem(CTS)ensurethatobjectswrittenindifferent.Netlanguagescaninteractwitheachother.ForCommunicatingbetweenprogramswritteninany.NETcomplaintlanguage,thetypeshavetobecompatibleonthebasiclevel.

ThesetypescanbeValueTypesorReferenceTypes.TheValueTypesarepassedbyvaluesandstoredinthestack.TheReferenceTypesarepassedbyreferencesandstoredintheheap.CommonTypeSystem(CTS)providesbasesetofDataTypeswhichisresponsibleforcrosslanguageintegration.

通用类型系统(CTS)描述了一组可用于不同的类型。

常见的网络语言。

那是,通用类型系统(CTS)确保对象用不同的。

NET语言可以互相交流。

写的任何程序之间的通信。

网络语言的类型的投诉,必须是兼容的基本水平。

这些类型可以是值类型还是引用类型。

值类型通过值存储在堆栈。

引用类型通过引用存储在堆。

通用类型系统(CTS)提供的数据类型是负责跨语言集成基础集。

c.Dictionaryclass

ThisclassbelongstoSystem.Collections.Genericnamespace.Itrepresentsacollectionofkeysandvalues.EachiteminthedictionaryistreatedasaKeyValuePairstructurerepresentingavalueanditskey.Eachaddition/entrytothedictionaryconsistsofavalueanditsassociatedkey.Akeyallowsfastaccessofavalue.EverykeyinaDictionarymustbeunique.Akeycannotbeanullreferencebutavaluecanbe.ThecapacityofaDictionaryisthenumberofelementstheDictionarycanhold.ThedefaultinitialcapacityforaDictionaryis3.AselementsareaddedtoaDictionary,thecapacityisautomaticallyincreasedasrequiredbyreallocatingtheinternalarray.

这类属于system.collections.generic命名空间。

它代表了一种键和值。

字典中的每个项目被视为代表的价值及其键KeyValuePair结构。

每个添加/进入词典包括一个值和其相关的关键。

一个关键的允许值的快速访问。

字典中每个键必须是唯一的。

一个关键的不可空引用,但可以将一个值。

一本字典的容量是字典可以容纳元素的数目。

一本字典的默认初始容量为3。

为元素添加到字典的容量,通过内部数组重新分配所需的自动增加。

d.Pathclass

PathclassbelongstoSystem.IOnamespace.PathclassisusedtoperformoperationsonStringinstancesthatcontainfileordirectorypathinformation.Theseoperationsareperformedinacross-platformmanner.Apathisastringthatprovidesthelocationofafileordirectory.ThemembersofthePathclassenableyoutoquicklyandeasilyperformcommonoperationssuchasdeterminingwhetherafilenameextensionispartofapath,andcombiningtwostringsintoonepathname.AllmembersofthePathclassarestaticandcanthereforebecalledwithouthavinganinstanceofapath.

System.IO命名空间中的类属的路径。

路径类用于执行操作的字符串的实例包含文件或目录的路径信息。

这些操作是一个跨平台的方式进行。

一个路径是一个字符串,提供了一个文件或目录的位置。

的路径类的成员使您快速、轻松地执行常见的操作,如确定一个文件的扩展名是一个路径的一部分,结合两个字符串合并成一个路径名。

的路径类的所有成员都是静态的,因此可以被称为没有一个路径的一个实例。

e.MailMessageclass

MailMessageclassbelongstoSystem.Net.Mailnamespace.TheinstancesoftheMailMessageclassareusedtoconstructe-mailmessagesthataretransmittedtoanSMTPserverfordeliveryusingtheSmtpClientclass.Tospecifythesender,recipient,andcontentsofane-mailmessage,youcanusetheassociatedpropertiesoftheMailMessageclass.

MailMessage类属于命名空间里。

MailMessage类的实例是用来构建传输,使用smtpclient类传递一个SMTP服务器的电子邮件。

指定发件人,收件人,以及电子邮件的内容,你可以使用MailMessage类的相关性质。

Mailpart

Property

Sender

From

Recipient

To

Carboncopies(CC)

CC

Blindcarboncopies(BCC)

Bcc

Attachments

Attachments

Subject

Subject

Messagebody

Body

f.WindowsServiceApplication

MicrosoftWindowsservicesenableyoutocreatelong-runningexecutableapplicationsthatrunintheirownWindowssessions.Theseservicescanbeautomaticallystartedwhenthecomputerboots,canbepausedandrestarted,anddonotshowanyuserinterface.Thismakesservicesidealforuseonaserverorwheneveryouneedlong-runningfunctionalitythatdoesnotinterferewithotheruserswhoareworkingonthesamecomputer.

Aservicegoesthroughseveralinternalstatesinitslifetime.First,theserviceisinstalledontothesystemonwhichitwillrun.ThisprocessexecutestheinstallersfortheserviceprojectandloadstheserviceintotheServicesControlManagerforthatcomputer.TheServicesControlManageristhecentralutilityprovidedbyWindowstoadministerservices.

Aftertheservicehasbeenloaded,itmustbestarted.Startingtheserviceallowsittobeginfunctioning.YoucanstartaservicefromtheServicesControlManager,fromServerExplorer,orfromcodebycallingtheServiceController.Startmethod.TheStartmethodpassesprocessingtotheapplication'sOnStartmethodandprocessesanycodeyoudefinedthere.

微软的Windows服务使您能够创建长期运行的可执行文件的应用在自己的Windows会话中运行。

这些服务可以在计算机启动时自动启动,可以暂停和重新启动,而不显示任何用户界面。

这使得服务的理想在服务器上使用,或当你需要长时间运行的功能,不影响其他工作的用户在同一台计算机上。

服务通过几个内部状态的寿命。

第一,服务安装到系统将要运行它。

这个过程执行安装的服务项目和负载服务到服务控制管理器的计算机。

服务控制管理器是由Windows提供的管理服务中心的效用。

服务加载后,必须启动。

启动服务使服务开始运行。

你可以从“服务控制管理器启动服务,从服务器资源管理器中,或从代码通过调用ServiceController开始的方法。

开始的方法经过处理的应用程序的任何代码你OnStart方法和过程的定义有。

g.Globalization

Whendevelopingworld-readyapplications,youmustfocusattentiononavarietyofissuesthroughouttheapplicationdesignanddevelopmentprocess.Thethreekeyissuesareglobalization,localizability,andlocalization.Globalizationisthefirststepintheprocess.

TheGlobalizationprocessbasicallyincludes,

1.Internationalizingtheapplicationcode

2.Followedbylocalizingtheapplicationtootherlanguagesandcultures

Internationalization:

Thisincludestranslate,store,retrieve,andpresentapplicationcontentforanylocale.

Localization:

adaptingyourapplicationtootherlocalesbytranslatingandformattingcontentaccordingtoculture.Thisinvolvesconfiguringtheapplicationforthespecificlanguages.

Culture:

ThisisthecombinationofLanguageandthelocation.Forexample

En-US -indicationEnglishspokenatUnitedStates.

En-GB-indicationEnglishspokenatGreatBriton.

TheSystem.Globalizationnamespacecontainsclassesthatdefineculture-relatedinformation,includingthelanguage,thecountry/region,thecalendarsinuse,theformatpatternsfordates,currencyandnumbers,andthesortorderforstrings.

当发展中国家准备应用程序,你必须集中注意力在整个应用程序设计和开发过程中的各种问题。

三个关键问题是全球化,本地化,和定位。

全球化是这个过程的第一步。

全球化的过程主要包括,

1应用程序代码的国际化。

2。

其次是本地化的应用到其他语言和文化国际化:

这包括翻译,存储,检索,和任何区域目前的应用内容。

定位:

适应通过翻译和格式化内容根据文化的其他地方你的应用。

这涉及到配置为特定语言的应用。

文化:

这是语言和位置的组合。

比如说呢我们表示在美国英语口语。

enGB表示在英国英语口语。

系统.全球化命名空间包含的类定义文化的相关信息,包括语言,国家/地区,使用的日历,日期格式模式,货币和数字,和字符串的排序顺序。

h.CultureInfoclass

ThisclassbelongstoSystem.Globalizationnamespace.Itprovidesinformationaboutaspecificculture,suchasthenamesoftheculture,thewritingsystem,thecalendarused,andhowtoformatdatesandsortstrings.TheCultureInfoclassalsoholdsmoreinformation,suchastheassociatedlanguage,sublanguage,country/region,calendar,andculturalconventions.Thisclassalsoprovidesaccesstoculture-specificinstancesofDateTimeFormatInfo,NumberFormatInfo,CompareInfo,andTextInfo.Theseobjectscontaintheinformationrequiredforculture-specificoperations,suchascasing,formattingdatesandnumbers,andcomparingstrings.

这类属于系统全球化的命名空间。

它提供了一个特定的文化信息,比如文化的名字,书写系统,日历,以及如何格式化日期和字符串排序。

CultureInfo类也拥有更多的信息,如相关的语言,语言,国家/地区,日历,和文化习俗。

这个类还提供了访问DateTimeFormatInfo,CompareInfo.NumberFormatInfo,文化的具体实例,并且实例。

这些对象所包含的文化具体操作所需的信息,如套管,格式化日期和数字,和字符串的比较。

i.Boxing

Boxingistheprocessofconvertingavaluetypetothetypeobjectortoanyinterfacetypeimplementedbythisvaluetype.WhentheCLRboxesavaluetype,itwrapsthevalueinsideaSystem.Objectandstoresitonthemanagedheap.Forexample

inti=123;

//Thefollowinglineboxesi.

objecto=i;

boxing是将一个值类型对象的类型或值类型实现的任何接口类型的过程。

当CLR框的值类型,它把价值体系里面。

对象存储在托管堆中。

比如说呢

j.Queue

Queuerepresentsafirst-in,first-outcollectionofobjects.Queuesareusefulforstoringmessagesintheordertheywerereceivedforsequentialprocessing.Thisclassimplementsaqueueasacirculararray.ObjectsstoredinaQueueareinsertedatoneendandremovedfromtheother.TheEnqueue()methodaddsanobjecttotheendoftheQueuewhileDequeue()methodremovesanobjectatthebeginningoftheQueue.

队列代表第一,先出对象的集合。

队列用于存储消息的顺序被接收的顺序处理。

这个类实现了一个队列作为一个圆形阵列。

存储在一个队列中的对象插入的一端,并从其他删除。

入队()方法将对象添加到队列的末尾,而将()方法排除在队列的开头一个对象。

k.ArrayList

ArrayListclassimplementstheIListinterfaceusinganarraywhosesizeisdynamicallyincreasedasrequired.ThecapacityofaArrayLististhenumberofelementstheArrayListcanhold.ThedefaultinitialcapacityforanArrayListis0.AselementsareaddedtoaArrayList,thecapacityisautomaticallyincreasedasrequiredthroughreallocation.Elementsinthiscollectioncanbeaccessedusinganintegerindex.Indexesinthiscollectionarezero-based.ArrayListacceptsanullreference(Nothing

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2