70-536中文题库(4)

2019-02-14 23:19

41.\\你使用SOAP写一个应用程序与另一个应用程序交互数据。你使用一个Department类继承ArrayList发送对象到另一个应用程序。Department类的对象名为dept。你需要运用SOAP来保证该应用程序连续的传送Department类的对象。下列哪段代码是你所需要的? A. SoapFormatter formatter = new SoapFormatter(); byte[] buffer = new byte[dept.Capacity];

MemoryStream stream = new MemoryStream(buffer); foreach (object o in dept) { formatter.Serialize(stream, o);} B. SoapFormatter formatter = new SoapFormatter(); byte[] buffer = new byte[dept.Capacity];

MemoryStream stream = new MemoryStream(buffer);

formatter.Serialize(stream, dept);

C. SoapFormatter formatter = new SoapFormatter(); MemoryStream stream = new MemoryStream();

foreach (object o in dept) { formatter.Serialize(stream, o);} D. SoapFormatter formatter = new SoapFormatter(); MemoryStream stream = new MemoryStream(); formatter.Serialize(stream, dept); Answer: D

42.你测试一个组件连续的Meeting类实例所以它们能被保存在文件系统。Meeting类定义如下:

The component contains a procedure with the following code segment. \\\\组件包括下列程序段

//你需要识别XML块被写在C. \\Meeting.xml文件中并将C. \\Meeting.xml文件中的描述内容XML块程序运行的结果

A.

Goals

1100 John Mary

B.

1100

John Mary

C.

1100

John Mary

D.

1100 John

title=\

Mary Answer: B

43. //你写一个应用程序运用单独的存储库存储用户的参数选择。应用程序运用多程序集。多用户在同一台计算机上运用该应用程序。你需要创建一个目录名参数选择在单独的存储区域目前Microsoft Windows的识别和程序集。你需用下列哪些代码段?

A. IsolatedStorageFile store;store = IsolatedStorageFile.GetUserStoreForAssembly(); store.CreateDirectory(\ B. IsolatedStorageFile store;

store = IsolatedStorageFile.GetMachineStoreForAssembly(); store.CreateDirectory(\ C. IsolatedStorageFile store;

store = IsolatedStorageFile.GetUserStoreForDomain(); store.CreateDirectory(\ D. IsolatedStorageFile store;

store = IsolatedStorageFile.GetMachineStoreForApplication(); store.CreateDirectory(\ Answer: A

44. //你需要写一个代码段去传递开始的80个字节从一个流变量名为stream1进入到一个新的字节数组名为byteArray内。你同样保证代码段能分配一定数量的字节转化到一个整数变量名为bytesTransferred。你需要用下列哪个代码段? A. bytesTransferred = stream1.Read(byteArray, 0, 80); B. for (int i = 0; i < 80; i++)

{ stream1.WriteByte(byteArray[i]); bytesTransferred = i; if (!stream1.CanWrite) { break; }}

C. while (bytesTransferred < 80)

{ stream1.Seek(1, SeekOrigin.Current);

byteArray[bytesTransferred++] = Convert.ToByte(stream1.ReadByte());} D. stream1.Write(byteArray, 0, 80);

bytesTransferred = byteArray.Length; Answer: A

45. //你写一个方法去接受一个字符串参数指定的消息。你的方法必须暂停消息参数进入到单独的排列文本和传递各自排列在第二个方法名为过程。下列哪个代码段是你需要的?

A. StringReader reader = new StringReader(message); Process(reader.ReadToEnd()); reader.Close();

B. StringReader reader = new StringReader(message);

while (reader.Peek() != -1) { string line = reader.Read().ToString(); Process(line);} reader.Close();

C. StringReader reader = new StringReader(message); Process(reader.ToString()); reader.Close();

D. StringReader reader = new StringReader(message); while (reader.Peek() != -1) { Process(reader.ReadLine());} reader.Close(); Answer: D

46. //你开发一个应用程序用于完成精确的运算。你需要保证该应用程序尽可能的完成同步复杂的计算。你将如何去做?

A. Set the IdealProcessor property of the ProcessThread object. B. Set the ProcessorAffinity property of the ProcessThread object.

C. For each calculation, call the QueueUserWorkItem method of the ThreadPool class. D. Set the Process.GetCurrentProcess().BasePriority property to High. Answer: C

47. //你开发一个服务应用程序名为PollingService能周期性的调用长时间运行的程序。这些程序

被称为DoWork方法。你运用服务应用程序代码。

//当你尝试开始服务,你收到错误报文。不能开始PollingService服务在本地电脑,错误1053:服务开启没有被响应或在短时间内控件请求。你需要修改服务应用程序代码因此服务完全开启。你将如何去做?

A. Move the loop code into the constructor of the service class from the OnStart method. B. Drag a timer component onto the design surface of the service. Move the calls to the long-running procedure

from the OnStart method into the Tick event procedure of the timer, set the Enabled property of the timer to True,

and call the Start method of the timer in the OnStart method.

C. Add a class-level System.Timers.Timer variable to the service class code. Move the call to the DoWork method

into the Elapsed event procedure of the timer, set the Enabled property of the timer to True, and call the Start

method of the timer in the OnStart method.

D. Move the loop code from the OnStart method into the DoWork method. Answer: C

48. //你开发一个服务应用程序名为FileService。在你们的网络中,你需要配置多数服务器的服务应用程序。你执行代码段(所包括的数字编号仅供参考。)

//如果FileService停止的话,你需要开发一个程序去开启FileService。在服务器识别时,程序利用服务器名输入参数来开启FileService。你将在代码段中加入下列哪两行代码(每个正确的答案引入解决方案的部门,多选二)

A. Insert the following line of code between lines 03 and 04:crtl.ServiceName = serverName; B. Insert the following line of code between lines 03 and 04:crtl.MachineName = serverName; C. Insert the following line of code between lines 03 and 04:crtl.Site.Name = serverName; D. Insert the following line of code between lines 04 and 05:crtl.Continue();


70-536中文题库(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:统计学基础 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: