a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 228|回复: 0

[考试试题] 微软MCSD.NET70306考题(110)

[复制链接]
发表于 2012-8-3 00:09:22 | 显示全部楼层 |阅读模式
  1.You use Visual Studio .NET to create a Windows-based data management application named MyApp. You implement the following code segment:Dim oSwitch As New _TraceSwitch(MySwitch, My TraceSwitch)Dim oWriter As New _IO.StreamWriter(IO.File.Open(c:MyApp.txt, _IO.FileMode.Append))Dim oListener As New _TextWriterTraceListener(oWriter)Trace.Listeners.Add(oListener)TryCustomerUpdate()Catch oEx As ExceptionTrace.WriteLineIf(oSwitch.TraceError, _Error: oEx.Message)FinallyTTrace.Listeners.Clear()oWriter.Close()oWriter = NothingEnd TryYou compile a debug version of the application and deploy it to a user's computer. The user reports errors, which are generated within the CustomerUpdate procedure.You decide to enable logging of the error messages generated by CustomerUpdate. You want to use the minimum amount of administrative effort.What should you do?A: Start the application with the following command line: /TRACE MySwitch 1.B: Start the application with the following command line: /d:TRACE=True.C: Start the application with the following command line: /XML switch=MySwitch value=1D: Create an environment variable on the user's computer. Name the variable MySwitch and assign it a value of 1.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-6 22:13 , Processed in 0.328634 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表