c#每日一题(十八)

VBDN 2005-04-26 11:22:34
You are developing a Windows Form application using C# for TKSuperBus Inc. The IT Security Executive requests that the application's trace information should be written to an event log. You have created an EventLogTraceListener object in code that will redirect output to the event log. What method should you implement to write text to the event log?(Select the best choice.)
A.Trace.WriteLine
B.TraceListener.WriteIndent
C.Trace.ToString
D.TextWriter.Write
...全文
130 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
VBDN 2005-04-27
  • 打赏
  • 举报
回复
参考答案:A
注释:
The WriteLine method of the Trace class writes a string to the event log specified by the EventLog property of an EventLog TraceListener object.The ToString method returns a string representation of the Trace object.The WriteIndent method of the TraceListener class places an indent,or tab,into the listener.The TextWriter class is used to write characters to a file;therefore,id does not meet the requirement of the scenario.
一小时 2005-04-26
  • 打赏
  • 举报
回复
a
iGray 2005-04-26
  • 打赏
  • 举报
回复
答案:A
fq_ln 2005-04-26
  • 打赏
  • 举报
回复
A
kingorking 2005-04-26
  • 打赏
  • 举报
回复
a
_-_-_-_- 2005-04-26
  • 打赏
  • 举报
回复
A
chinawn 2005-04-26
  • 打赏
  • 举报
回复
a

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧