微软认证考试资料.docx

上传人:b****1 文档编号:12757206 上传时间:2023-04-21 格式:DOCX 页数:185 大小:661.39KB
下载 相关 举报
微软认证考试资料.docx_第1页
第1页 / 共185页
微软认证考试资料.docx_第2页
第2页 / 共185页
微软认证考试资料.docx_第3页
第3页 / 共185页
微软认证考试资料.docx_第4页
第4页 / 共185页
微软认证考试资料.docx_第5页
第5页 / 共185页
点击查看更多>>
下载资源
资源描述

微软认证考试资料.docx

《微软认证考试资料.docx》由会员分享,可在线阅读,更多相关《微软认证考试资料.docx(185页珍藏版)》请在冰豆网上搜索。

微软认证考试资料.docx

微软认证考试资料

1、question1

YouworkastheapplicationdeveloperatCer-T.Cer-TusesVisualStudio.Net2005asitsapplicationdevelopmentplatform.

你在Cer-T做应用程序开发人员,Cer-T使用VS2005作为其应用程序的开发平台。

Youaredevelopinga.NetFramework2.0applicationusedtostoreatype-safelistofnamesande-mailaddresses.

你正在开发一个.NetFramework2.0应用程序,用来存储一个包含了姓名和电子邮件的类型安全的列表(清单)。

Thelistwillbepopulatedallatoncefromthesorteddatawhichmeansyouwellnotalwaysneedtoperforminsertionordeletionoperationsonthddata.

这个列表会被完全的填充从排序的数据,这就意味着你不需要经常对这些数据完成插入或删除操作。

Youarerequiredtochooseadatastructurethatoptimizes(优化)memoryuseandhasgoodperformance.

请你选择一个数据结构,以便优化内存使用,具有良好的性能。

Whatshouldyoudo?

该如何做?

A、TheSystem.Collections.Generic.SortedListclassshouldbeused

B、TheSystem.Collections.HashTableclassshouldbeused

C、TheSystem.Collections.Generic.SortedDictionaryclassshouldbeused

D、TheSystem.Collections.SortedListclassshouldbeused

点评:

SortedList表示键/值对的集合,这些键值对按键排序并可按照键和索引访问。

HashTable表示键/值对的集合,这些键值对根据键的哈希代码进行组织。

C该类不存在

D非类型安全的,没有引人泛型。

2、Question2

YouworkasanapplicationdeveloperatCer-T.Youhaverecentlycreatedanapplicationthatincludethecodeshownbelow.

你在Cer-T做应用程序开发人员。

最近你创建了一个应用程序,包含如下的代码:

publicdelegatestringGetFileContentsDel();

publicstringGetFileContens()

{

//Processfileandreturnresults

}

YounowneedtoinvoketheGetFileContentsmethodasynchronously(异步).YouhavetoensurethatthecodeyouusetoinvoketheGetFileContentsmethodwillcontinuetoprocessotheruserinstructions,anddisplaystheresultsassoonastheGetFileContentsmethodfinishesprocessing.Whatshouldyoudo?

现在你需要异步调用GetFileContents方法。

必须确保你的代码在调用GetFileContents方法的同时将继续处理其他用户的指令,并在GetFileContents方法完成处理后显示结果。

你应该怎么做?

A、Usethefollowingcode:

//创建委托对象并且实例化

GetFileContentsDeldelAsync=newGetFileContentsDel(GetFileContents);

IAsyncResultresult=delAsync.BeginInvoke(null,null);

while(!

resul.IsCompleted)

{

//Processotheruserinstructions

}

stringstrFile=delAsync.EndInvoke(result);

B、Usethefollowingcode:

GetFileContentsDeldelAsync=newGetFileContentsDel(GetFileContents);

stringstrFile=delAsync.Invoke();//直接调用

C、Usethefollowingcode:

stringstrFile=GetFileContents.Invoke();//语法错误

D、Usethefollowingcode:

GetFileContentsDeldelAsync=newGetFileContentsDel(GetFileContents);

IAsyncResultresult=delAsync.BeginInvoke(null,null);

//Processotheruserinstructions

stringstrFile=delAsync.EndInvoke(result);

点评:

IAsyncResult包含异步操作的方法的类实现。

对于只有同步方法的对象,只需要定义一个委托,并使用其BeginInvoke和EndInvoke方法就可以了。

B、直接调用

C、语法错误

D、与题意不符合,没有状态判断

3、Question3

YouworkastheapplicationdeveloperatHi-T.YouhavecreatedanewserviceapplicationnamedApp01.App01muststillbedeployedintotheHi-Tnetwork.AHi-TnetworkadministratornamedRosanneKeithhasalreadycreatedauserccountforApp01.YoumustconfigureApp01toruninthecontextofthisnewuseraccount.Whatshouldyoudonext?

你在Hi-T做应用程序开发人员。

你已经创建了一个新的服务应用程序命名App01.该服务必须部署在Hi-T的网络中。

Hi-T的一个叫罗萨安娜基思的网络管理员已经创建了App01的用户帐号。

在新的用户帐号下要运行App01,你必须做一些相应的配置。

下一步应该做什么?

A、BeforeDeployingApp01,specifythestartTypepropertyoftheServiceInstallerclass.

B、BeforedelployingApp01,specifytheAccount,Username,andPasswordpropertiesoftheServiceProcessInstallerclass.

在部署App01之前,指定账户,用户名和密码的ServiceProcessInstaller类的属性。

C、InstalltheservicebyusingtheCONFIGoptionofthenet.execommand-linetool.

D、Installtheservicebyusingtheinstallutil.execommand-linetool.

点评:

4、Question4

Youpassavalue-typevariableintoaprocedureasanargument.Theprocedurechangesthevariable;however,whentheprocedurereturns,thevariablehasnotchanged.Whathappened?

(Chooseone.)

你在一个方法中传入了一个值类型的变量做参数。

方法里改变了这个变量;而当方法返回时,变量的值并没有被改变。

这是为什么?

(选择一项)

A、Thevariablewasnotinitializedbeforeitwaspassedin.

该变量在传入的时候没有被初始化

B、Passingavaluetypeintoaprocedurecreatesacopyofthedata.

向方法里传入值类型的变量,实际上是传入了一个数据的副本。

C、Thevariablewasredeclaredwithintheprocedurelevel.

在方法体中重新申明了这个变量。

D、Theprocedurehandledthevariableasareference.

方法按引用处理了该变量

点评:

考察了数据传参的方式:

按值传参和按引用传参。

5、Question5

YouworkastheapplicationdeveloperatHi-T.YouareworkingonanewapplicationnamedApp01.App01isconfiguredtoperformaseriesofmathematicalcalculations.

你在Hi-做应用程序开发人员。

正在开发一款新的应用程序,名字叫App01;App01配置为执行一系列的数学计算。

YoucreateaclassnamedAppClassandcreateaprocedurenamedAppSP.AppSPmustexecuteonaninstanceoftheclass.

你创建了一个AppClass的类和一个AppSP的方法。

该方法必须作为该类的实例运行。

Youmustconfiguretheapplication’suserinterface(UI)sothatitcontinuestorespondforthedurationthatcalculationsareperformed.YoumustwritethecodesegmentforcallingtheAppSPprocedurewhichwillaccomplishyourobjective.Choosethecodesegmentwhichyoushoulduse.

你必须配置应用程序的用户界面,以便它在进行计算期间能够继续做出响应。

你必须编写用于调用AppSP程序的代码,以实现上述目标。

选择下面的那段代码可以使用。

A、privatevoidAppSP(){….}

privatevoidDoWork()

{

AppClassmyValues=newAppClass();

ThreadnewThread=newThread(newThreadStart(AppSP));

newThread.Start(myValues);

}

B、privatevoidAppSP(){…}

privatevoidDoWork()

{

AppClassmyValues=newAppClass();

ThreadStartdelStart=newThreadStart(AppSP);

ThreadnewThread=newThread(delStart);

if(newThread.IsAlive)

{

newThread.Start(myValues);

}

}

C、privatevoidAppSP(AppClassvalues){…..}

privatevoidDoWork()

{

AppClassmyValues=newAppClass();

Application.DoEvents();

AppSP(myValues);

Application.DoEvents();

}

D、privatevoidAppSP(objectvalues){….}

privatevoidDoWork()

{

AppClassmyValues=newAppClass();

ThreadnewThread=newThread(newParameterizedThreadStart(AppSP));

}

点评:

引入线程

ThreadStart该委托不能带参数

ParameterizedThreadStart该委托可以带参数

6、question6

YouworkastheapplicationdeveloperatCer-T.Cer-TusesVisualStudio.Net2005asitsapplicationdevelopmentplatform.

你在Cer-T做应用程序开发人员。

Cer-T用VS2005作为其开发平台。

Youaredevelopinga.NETFramework2.0financialapplicationandarebusydevelopingamodulethatbacksupthecriticaldataonaseparateharddrive.

你正在开发一款.net2.0的财务应用程序,并忙于开发一个模块,备份关键数据到一个独立的硬盘驱动器(硬盘)

YouarerequiredtodecidewhichpropertiesoftheDriveInfoclasstouseandfindthetypeoffilesystemlikeFATorNTFSandthedrivefreespaceandtheuserdiskquota(配额/指标)shouldbeignoredbytheapplication.

你必须决定DriverInfo类使用的参数,找到像FAT或者NTFS类型的文件系统和磁盘的可以空间,并使应用程序忽略用户磁盘的配额。

Whatshouldyoudo?

该如何做?

A、UsetheDriveFormatandTotalFreeSpacepropertiesoftheDriveInfoclass.

B、UsetheDriveTypeandAvailableFreeSpacepropertiesoftheDriveInfoclass.

C、UsetheVolumeLabelandTotalSizepropertiesoftheDriveInfoclass

D、UsetheDriveTypeandTotalSizepropertiesoftheDriveInfoclass.

E、UsetheDriveFormatandAvailableFreeSpacepropertiesoftheDriveInfoclass.

点评:

DriverInfo类的常用属性和方法

没有找到指定的属性

7、Question7

Youarewritingamethodforaconsoleapplicationthatlistsoptionsavailabletoauserbasedonhisgroupmemberships.Whichtechniqueshouldyouuse?

你正在为一个控制台应用程序写一个方法,给一个基于组成员的用户列出可用的选项。

下面哪项技术可以?

A、WindowsPrincipal.IsInRole

B、WindowsIdentity.IsInRole

C、Imperative(迫切的)RBSdemands(需求)

D、Declarative(声明)RBSdemands

点评:

WindowsPrincipal允许代码检查Windows用户的Windows组成员身份

WindowsIdentity表示Windows用户

8、Question8

YouareastheapplicationdeveloperatHi-T.YouareworkingonanapplicationnamedApp01.App01mustbeconfiguredtouserole-basedsecurityandauthentication.

你在Hi-做应用程序开发人员。

正在开发一款App01的应用程序。

该程序必须配置为使用基于角色安全和身份验证。

Youmustdevelopthecodesegmentwhichwillresultintheruntimeassigninganunauthenticatedprincipalobjecttoeachrunningthread.

你必须开发代码段,这将导致在运行时分配了一个未经验证的主要对象对每个运行的线程。

Choosethecodesegmentwhichwillaccomplishthetask.

选择那段代码可以实现。

A、AppDomaindomain=AppDomain.CurrentDomain;

domain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)

B、AppDomaindomain=AppDomain.CurrentDomain;

domain.SetThreadPrincipal(newWindowsPrinipal(null));

C、AppDomaindomain=AppDomain.CurrentDomain;

domain.SetAppDomainPolicy(PolicyLevel.CreateAppDomainLevel());

D、AppDomaindomain=AppDomain.CurrentDomain;

domain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal);

点评:

AppDomain

表示应用程序域,它表示一个应用程序在其中执行的独立环境。

无法继承此类。

9、Question9

Giventhebestanswer,whichofthefollowinglinesofcodewouldreverse(反向/倒转)thesecurityrestriction?

(Chooseallthanapply)

给出最好的答案,下面的那个代码行会破坏安全限制?

(选择多项)

‘VB‘注释

DimeasEventLogPermission=NewEventLogPermission(PermissionState.Unrestricted)

PermitOnly

//C#

EventLogPermissione=newEventLogPermission(PermissionState.Unrestricted);

PermitOnly();

A、e.RevertPermitOnly

B、CodeAccessPermission.RevertPermitOnly

C、e.RevertAll

D、CodeAccessPermission.RevertAll

E、e.RevertDeny

F、CodeAccessPermission.RevertDeny

点评:

CodeAccessPermission类

定义了一个所有代码访问权限的底层结构

System.Security.CodeAccessPermission

10、Question10

YouworkastheapplicationdeveloperatHi-T.Youareworkingonanewrequirement.YouhavetocreateaclasslibrarythatwillopenthenetworksocketconnectionstocomputersontheHi-Tnetwork.

你在Hi-T做应用程序开发员。

在工作上有了新的要求,需要创建一个类库,将打开网络套接字连接上Hi-T的网络。

Theclasslibrarymustbedeployedtotheglobalassemblycache,withfulltrustgranted.Tocaterfornetworksocketconnectionsbeingused,youdevelopthiscodesegment;

该类库必须部署到全局程序集缓存,授予完全信任。

为配合正在使用的网络套接字连接,你开发如下的代码段:

SocketPermissionpermission=newSocketPermission(PermissionState.Unrestricted);

permission.Assert();

Youdiscoverthoughthattherearecertainexistingapplicationswhichdonothavetherequiredpermissionstoopenthenetworksocketconnections.Youdecidetocanceltheassertion.Choosethecodesegmentwhichwillaccomplishthistask.

你发现,虽然有一些现有的应用程序不具有所需的权限打开网络套接字连

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

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1